Linux.com

crontab not working

Link to this post 03 May 12

Hi,
I need to start couple of services regularly (once a day), I have set it as below, but its not executing. Kindly assist.
below is the setup

[root@auth ~]# crontab -l

# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)

# | | .---------- day of month (1 - 31)

# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...

# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR

#sun,mon,tue,wed,thu,fri,sat

# | | | | |

# * * * * * command to be executed

52 10 * * * /etc/init.d/dirsrv-admin restart &&

53 10 * * * /etc/init.d/dirsrv restart &&

Note: flavour: fedora 11

Thanks,
linuxque

Link to this post 03 May 12

1- Do you have the cron daemon running?
2- Redirect the output of the commands to check if there's any problem while running it
3- You know that you need to set the ENV variables in the contrab? (ala PATH=/bin/ ...)
4- Why the "&&"?

Link to this post 26 Jan 13

try this

1) # pgrep crond
2)if not running
check /etc/init.d/ for crond daemon
then try to start it
#/etc/init.d/crond start

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board