crontab problem
Hi
I have a Redhat Enterprise Linux box. Here's how my /etc/crontab file looks. SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/ # run-parts 01 * * * * root run-parts /etc/cron.hourly 02 4 * * * root run-parts /etc/cron.daily 22 4 * * 0 root run-parts /etc/cron.weekly 42 4 1 * * root run-parts /etc/cron.monthly # Weekly back-up script that runs on Monday morning at 1:15AM 15 1 * * 1 /u/system/b 2>/u/system/b.out # Daily back-up script that runs on Tue,Wed,Thu,Fri,Sat mornings 15 1 * * 2-6 /u/system/d/d 2>/u/system/d/d.out Both the weekly and the daily back-up scripts aren't getting triggered by the cron deamon. I restarted the cron daemon but it did not help. When I type "crontab -l" while logged in as root, I get a message which says "no crontab for root". Do I need to add "root" to the two lines that I have added to the crontab? What could I be doing wrong. I edited the /etc/crontab file using the command "vi /etc/crontab". I did not use "crontab -e". Thanks Andre |
/etc/crontab is *NOT* root's crontab file. it is the system wide crontab file, which has, as you've guessed, that extra column defining who the process will run as. the root user has a seperate user crontab file, you can use if you wish. if you run "crontab -e" you'll see none of those entries are visible, because it's a different file.
|
Thanks for the reply. I just had to add the username (in my case, root) in those two lines!
|
Quote:
|
All times are GMT -5. The time now is 04:46 AM. |