Link to home
Start Free TrialLog in
Avatar of AXISHK
AXISHK

asked on

crontab to restart daemon

I have scheduled to restart my daemon at 14:30 daily but it doesn't start as expected. Manually restart the daemon with "/etc/rc.d/init.d/myforward restart" works fine. Any idea ?  Do I make anything wrong ?

30 14 * * * root /etc/rc.d/init.d/myforward restart
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

What's root doing there?

It should read:
30 14 * * * /etc/rc.d/init.d/myforward restart

Plus, check that the paths are defined inside myforward. By default, cron does not source .bashrc or any other files in the home dir.

HTH,
Dan
Avatar of AXISHK
AXISHK

ASKER

Tks, is there any log to record whehter crontab has run or not ?
ASKER CERTIFIED SOLUTION
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AXISHK

ASKER

Tks