cron restart in fedora 11
Hello,
I am trying to schedule a restart every day at 16:00. some say that I should edit the /etc/crontab file, while others say that I should use the crontab -e command to specify a cron job.... I don't know the difference, what I know is that both did not work with me... However, I'll list my small script along with the result of ( crontab -l ) and the logs in /var/log/cron... The script:(It's location /etc/cron.me/restart) Quote:
Quote:
Quote:
So why doesn't this work? I've taken all precautions that I know: -chmod 755 /etc/cron.me/restart -The shutdown command can be executed by root user only so I checked the group and user owners of /etc/cron.me and /etc/cron.me/restart ... and they are set to root. - I restart the crond service and reload it. - I executed the script : /etc/cron.me/restart and it restarted my comp. but it doesn't do the same using cron......!!!!!! Thanks for ur help.. |
'cron' will understand a full path only :
/sbin/shutdown -r now ..... |
this URL will be of help http://kbase.redhat.com/faq/docs/DOC-9248
|
Thanks, that "full path order" solved my problem.
|
All times are GMT -5. The time now is 01:07 AM. |