How to run a cronjob?

Greetings all,

I want to run a cronjob that will check if my crashplan service is running once a day. If it’s not running, then I want to restart it.

To do this,  I created a simple bash script called CP_restart_script  that checks if the service is running, if no, then restart it. The script is in /etc/ and it works fine when called from the command line when logged in as root.

I then created a file called my_cronjobs in /etc/cron.d which just has the following line in it:

* * * * * root /etc/CP_restart_script

Here I’m just testing the job by having it run every minute. 

Any ideas, why this doesn’t work? I’ve read that crontab -e won’t work on a MyCloud so that’s why I’m using cron.d.



Though you shouldn’t have to, did you try just restarting cron?

crontab -e works perfectly on a My Cloud. I’m running 5 cronjobs through that

just add that line in /etc/crontab

crontab should be working fine on both v3 and v4 firmwares for every users. crontab -l to list, -e to edit, -r to purge, <file to import etc.

Thanks all for the help.

The issues were all due to me being a complete noob. To help troubleshoot it was helpful to use logging features (duh!).

I can confirm that crontab -e works just fine as root. :slight_smile: