[SOLVED] Cron doesn't seem to work for me!
Every time I try to do something with cron, it never seems to work. I am using Mandriva 2010.2, and the last two entries were added by me to help backup my mythtv system and also run the listing service scheduler. I want them to run outside the normal directory cron times, so I have them seperate... however, they don't seem to want to run.
I edited /etc/crontab in an editor, then restarted the crond program. I even rebooted. These things don't run! If I run the command on the command line (and as the respective user), they work just fine. What am I doing wrong? Code:
[krisbee2010@localhost mythtv_backup]$ cat /etc/crontab |
Look in the following log files after the time of a job passed:
/var/log/messeges /var/log/cron Post the results here. |
I forgot to mention, I did look in /var/log/cron/info.log and error.log. No errors. Info log says it ran, but the reality is it didn't (otherwise I would see an additional file for the backup)...
|
Quote:
what is run ? just the cron program, or your program that you have put in the crontab file ? try crontab -v , and inside there put your programs schedule . |
It says that the program ran that was listed in /etc/crontab. I am at work at the moment, so I can't post.
I think I read that sometimes with /etc/crontab and putting things in there don't work so well since environment data isn't translated there, and the preferred method is to use the crontab program and log in as each user and make their own seperate crontabs. I am going to give this a try tonight to see how it works and post the results. |
Env data isn't take into account with cron, you should put the Env variables yourself in the beeining of the crontab file.
|
Well, I don't know why, but running crontab as each user (changing the default editor to nano for ease) did the trick (as well as removing the /etc/crontab entries). To expand, I ran crontab -e to edit my crontab as my default account, and then switched to root and did the same thing, adding the entries I wanted to have run.
I guess I can changed this to solved, though it is a headscratcher why it didn't work the other way - I ran environmental values in /etc/crontab... oh well... And since someone asked for me to show my /var/log/cron/info.log, I have done so... Code:
Oct 24 03:02:01 localhost CROND[24088]: (krisbee2010) CMD (/usr/local/bin/mythconverg_backup.pl) |
All times are GMT -5. The time now is 06:23 PM. |