LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Backup script won't run in cron job. Why? (https://www.linuxquestions.org/questions/linux-general-1/backup-script-wont-run-in-cron-job-why-502661/)

macemoneta 11-21-2006 10:27 AM

The naming restriction isn't noted in my (Fedora) documentation. However, Ubuntu probably pulls the Debian vixie-cron, and Fedora is probabaly using the Redhat patch set. Vixie-cron hasn't been maintained since 1993, so each distribution's patch set can diverge quite a bit. See this discussion.

matthewg42 11-21-2006 10:34 AM

I think Ubuntu uses anacron.

vegas35 10-30-2007 09:37 PM

another reason
 
I had a cron job that worked on Fedora, but not SuSE. Same issue, as far as being able to run it interactively, but from cron there was no output. Turns out the TERM env var wasn't set for some reason when it ran from cron.

macemoneta 10-30-2007 10:38 PM

Quote:

Originally Posted by vegas35 (Post 2942935)
I had a cron job that worked on Fedora, but not SuSE. Same issue, as far as being able to run it interactively, but from cron there was no output. Turns out the TERM env var wasn't set for some reason when it ran from cron.

Could it be because there is no terminal when running a cron job? :)

vegas35 10-31-2007 08:26 PM

Quote:

Originally Posted by macemoneta (Post 2942970)
Could it be because there is no terminal when running a cron job? :)

My point is that I didn't have that problem on my Fedora servers, only on the SuSE box. I added a "TERM=xterm" to the top of my SuSE's crontab, and it fixed the problem. I didn't have to add that line on the Fedora servers' crontabs.


All times are GMT -5. The time now is 05:06 AM.