Unable to create cronjobs using cronie

If I understand correctly, rclone needs and uses a configuration file, and maybe cron is not able to find it.
So, this might be a problem of environment variables and/or even use the whole path to rclone.
Anyway, this wouldn’t explain why the entry is not saved at all… I have no idea.
In general, to achieve something @reboot, I’d rather create a systemd service running at startup.
You could start with something like this (to be refined for sure):
Create a file in /etc/systemd/system, e.g. rclone-gdrive.service with the following contents:

[Unit]
Description=Rclone Google Drive Mount
Wants=network-online.target
After=network-online.target

[Service]
TimeoutStartSec=10
ExecStart=/usr/bin/rclone mount --daemon GDrive:<path> /home/elia/DB
Restart=always

[Install]
WantedBy=multi-user.target

Then

sudo systemctl enable --now rclone-gdrive.service

Edit: it will be probably a bit more complicated. See e g.

Just found a solution you could start with:

4 Likes