RClone runs, but not does run via Anacron

I have an entry on my anacrontab to run Rclone sync once daily, 15 mins delay:

sudo nano /etc/anacrontab


1 5 cron.daily run-parts --report /etc/cron.daily
7 10 cron.weekly run-parts --report /etc/cron.weekly
@monthly 15 cron.monthly run-parts --report /etc/cron.monthly
1 15 gdrivesync.daily /home/alex/Rclonecron.sh

The script anacron calls is Rclonecron.sh - and this runs each day:

mkdir “/mnt/sda7/ZZZ LINUX STUFF/RClone Sync Data_CRONTESTDO”
/usr/bin/rclone sync GDriveSync:/ “/mnt/sda7/ZZZ LINUX STUFF/RClone Sync Data”

Running this script manually via the terminal works - and I have done the chmod +x to make the script executable.

But through anacron, the MKDIR works (so the script is running OK from anacron), but no sync files appear at all.

This means that rclone is failing to run thru anacron only.

I don’t know why this is - can anyone suggest a solution.

Thanks :slight_smile:

Solved it.

Ran it under a standard cron, not sudo cron:

15 * * * * /home/alex/Rclonecron.sh >/dev/null