Ubuntu CRON JOB migrate to FreeBSD

Hi..

I have a cron job on ubuntu server, however I migrate my app to FreeBSD server and can not make the run cron.

Ubuntu crontab
Code:
*/15 * * * * /usr/home/websites/vhosts/management/www/protected/yiic ebmanager
however I can not set up this cron on FreeBSD.

In /var/log/cron does not appear any error, but I do not I make my application to download an RSS.
 
...or you can edit /etc/crontab as well...don't know if it's bad, but I do it all the time :). If you decide to use this solution, your entry should be changed to this:

Code:
*/15 * * * * [B]root[/B] /usr/home/websites/vhosts/management/www/protected/yiic ebmanager

or whoever the user is supposed to run this command.
 
mamalos said:
...or you can edit /etc/crontab as well...don't know if it's bad, but I do it all the time :).
Leave /etc/crontab alone. If you have to run something as root use crontab -e as root.
 
Why SirDice?

It's much easier to remember it when migrating/upgrading to another machine than root's cron folder. As far as security is concerned, its only problem is that it is readable by anyone -if I am not mistaken-, right?
 
It's more to do with updating. The update process may change /etc/crontab but it will never touch /var/cron/tabs/*.
 
OK, but during upgrading (after running mergemaster(8) which is the real "danger" for this file) one already needs to be careful about some files (/etc/passwd, /etc/master.passwd, /etc/ssh/sshd_config, /etc/hosts and some others); adding one more to my watch list isn't that much of a burden...

And yes, and I do know that this is a very personal opinion I am writing..:)
 
mamalos said:
...or you can edit /etc/crontab as well...don't know if it's bad, but I do it all the time :). If you decide to use this solution, your entry should be changed to this:

Code:
*/15 * * * * [B]root[/B] /usr/home/websites/vhosts/management/www/protected/yiic ebmanager

or whoever the user is supposed to run this command.

So I put this line on user crontab (sudo crontab -e), but don't work.

I put again on /etc/crontab and again don't work.

I run this command on shell script and work again

My script file, download a RSS e insert om my database, this script have a screen debug, so I run on crontab include this command
Code:
>> /var/log/ebmanager_err.log
this script have a chmod 777 to user pftd, and group wheel(same group to root user), but don't work...

I don't more have ideia...


on crontab this script runinng, and dont appear any error, but my script don't execute success.
 
nandinhuuoliveira said:
this script have a chmod 777 to user pftd, and group wheel(same group to root user), but don't work...
Bad, bad idea. Now any user logging in on your system can modify that file and gain root access. You just gave all your users a backdoor.
 
Correct....

So I put this line on root crontab (sudo su | crontab -e), but don't work.

I put again on /etc/crontab and again don't work.
I run this command on shell script and work again.

My script file, download a RSS e insert om my database, this script have a screen debug, so I run on crontab include this command
Code:
>> /var/log/ebmanager_err.log
this script have a chmod 777 to user pftd, and group wheel(same group to root user), but don't work...

I don't more have idea...


on crontab this script runinng, and dont appear any error, but my script don't execute success.
 
the line with root won't work with crontab -e, you have to remove root. What are the logs of /var/log/cron. Moreover, what is the second argument you're giving in this command? I hope it's not a file, cause if so it is relative to your current working directory (CWD).
 
I'm actually a Windows Administrator Certificate, but the first time I am working with FreeBSD, I have some experience with Ubuntu, and am also a user of Mac OSX, and I know that to change the permission to 777 to open a big security hole.

I'll change the permission for the orignal, but need to make the script run in cron, but I have to run this shell script in every 30min.

This script is an executable php, I tried to create a. sh file and put the php script inside, but still not done downloading my RSS and entering the information into my database.
 
mamalos said:
the line with root won't work with crontab -e, you have to remove root. What are the logs of /var/log/cron. Moreover, what is the second argument you're giving in this command? I hope it's not a file, cause if so it is relative to your current working directory (CWD).


this argumment, is a class on my php
 
mamalos said:
Which implies that you may have to use full path commands inside your script.

it may be, I will contact my programmer that made the entire script to put the full path

but because the command is executed in the shell script and not in cron, and put the same command
 
nandinhuuoliveira said:
I remembered that the script is encrypted with IonCube and I can not see the source code
That's rather useless. Anybody can easily reverse it. Think about it, the interpreter needs to be able to read it or it can't execute it. To be able to read it it must be decoded. If the script can decode itself, anybody can decode it.
 
Yes I have the ioncube decrypt, but he is paid for that work ...
I just have to keep the server running and update the application by cron
 
How do I know the script ran correctly?

I see the /var/log/cron, but it only shows the user who executed and full command, hand tells me if it was run entirely as the windows task scheduler that shows me the status of job.
 
Back
Top