indivision
Guru
- Joined
- Jan 4, 2013
- Messages
- 806
I am trying to set up a cron task that restarts a jail service every 6 hours. Here is the command:
When I run this code in the shell as root or click "Run Now" in the View Cron Jobs section, it works.
However, it doesn't appear to run properly on its own. The schedule looks to be ok because output is generated by the task right on schedule as expected. But, when I look at the service at those times, it is not affected.
I believe I have the settings right so that it sends output when there is an error. And I am getting output. But, its not informative error information. Here is what the output emails are:
Any ideas about what is happening here and how to get this Cron task to run properly?
Thank you.
Code:
jexec <jail_name> service <service_name> restart
When I run this code in the shell as root or click "Run Now" in the View Cron Jobs section, it works.
However, it doesn't appear to run properly on its own. The schedule looks to be ok because output is generated by the task right on schedule as expected. But, when I look at the service at those times, it is not affected.
I believe I have the settings right so that it sends output when there is an error. And I am getting output. But, its not informative error information. Here is what the output emails are:
Code:
usage: chown [-fhvx] [-R [-H | -L | -P]] owner[:group] file ... chown [-fhvx] [-R [-H | -L | -P]] :group file ...
Any ideas about what is happening here and how to get this Cron task to run properly?
Thank you.