Cronjob not working


I am trying to setup a cron job for rclone to sync files to Google Drive. I can run the script manually and it works (doesn’t ask for password or anything either). Here is my code:

if pidof -o %PPID -x “”; then
exit 1
rclone sync /mnt/md0/plex/movies GoogleDriveCrypt:/ -v --min-age 15m --log-file=/var/log/rclone/rclone-plex-upload.log

Cron Tab:
*/5 * * * * /usr/local/bin/

Can anyone explain why when I run the script manually it works, but the cron job doesn’t work?
Thanks in advance.

Edit: Fixed it. Moved the script to it to my user in /home and ran it from there.


haha i just came on to post the exact same thing.

I took some tips from you, but still cant get it working.

I’m on a seedbox so not sure if thats the reason why…

I put my upload script in /home2/rich/bin/

the script is:

if pidof -o %PPID -x “”; then
exit 1
rclone move /home2/rich/download/ acdencrypt: -v --min-age 10m --log-file=/home2/rich/logs/acd-cron.log

my cron is:

*/2 * * * * /home2/rich/bin/

Like the OP i can run it manually but the cron doesnt start it

Any ideas?

Script + Crontab help

I had a similar issue with one script mine.
First, check by

service cron status

if the CRON had called your script and if the service is started. In my case I have to set some variable of the environment.

Check it on SO if the bash had been called.



For Cronjob you need to use Absolute path to avoid environment problem :slight_smile:

So instead of rclone move ==> /usr/sbin/rclone move


My cronjob fixed because of this hint :+1: