Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron not working (RedHat 9) 1

Status
Not open for further replies.

bitwise

Programmer
Mar 15, 2001
269
US
System: Red Hat 9
Kernel: 2.4.20-8

As root, I edit the /etc/crontab file and add my line:

01 13 * * * /root/myscript.sh

Also, the crond server is running; however, my script never runs. What am I missing? Is there a service in chkconfig that I need to also turn on?

Thanks,
-bitwise
 
issue [tt]crontab -e[/tt] in order to edit the crontab.

Cheers.
 
I've tried crontab -e to edit the crontab, but I'm no so sure that is the correct way to do it in Red Hat Linux. In anycase, crontab -e doesn't work either. It allows me to input my cron command; however, it never runs. Any thoughts?

-bitwise
 
mrregan has the write syntax for a crontab -e ...

Cron has two variations, there is the crontab for users and then there is application spesific cron jobs that are set in /etc/cron.* files. It is recommended that you use crontab for any regular schedualing (even as root), and that you don't edit the file directly, but use the crontab command.

The fields are:

minute of hour
hour of day
day of month
month
day of week
user
command
[arguments]

since your script isn't a user, I'm suprised your not getting e-mailed errors from cron.

[plug=shameless]
[/plug]
 
Time to expose my ignorance... mrregan said
01 13 * * * root /root/myscript.sh
Would someone kindly explain to me just what this does?
 
Is your cron daemon running? Usually I'll create a schedule file and import it using crontab -u [username] schedule.txt.


--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top