The error I get from this outputting in the cronjob is as follows: Can't exec "service": No such file or directory So the question is, why is the command "service" not working in cronjob but works manually.
Never make assumptions. I noticed right off as someone else did that you did not specify the path to your command. The PATH variable you see from the command line is likely to be different than what a cronjob is going to see. There are a couple of ways you can cure this:
- You could specify the full path name to the command you are trying to invoke from system
- Add a fully populated PATH to your crontab. Warning be careful of what directories you add to your PATH from within your crontab. This could lead to a security hole so be sure of what you are doing.
Peter L. Berghold -- Unix Professional
Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg