rClone Scheduling to Google Drive

I'm trying to setup a cronjob in Vesta CP with my following script:

#!/bin/bash
if pidof -o %PPID -x “rclone-cron.sh”; then
exit 1
fi
rclone copy /home/admin/web/domain.com/public_html gdrive:public_html
exit

I've made the .sh executable and added the following command in Vesta CP cron jobs:

/home/rclone-cron.sh >/dev/null 2>&1

I'm trying to get this to run every Wednesday but it doesn't seem to run, can anyone help me please or advise me on what I maybe doing wrong?

hi, try this
How to create and delete cron jobs in Vesta - PlotHost

I already have the command in Vesta CP, the problem I have is it's not running.

as this is not a rclone question and specific to vesta, perhaps best to post at
https://forum.vestacp.com/

I'd imagine that's based on some form of Linux as I've never heard of it.

Cron jobs require full paths to things because they have no environment.

So my upload script looks like:

I'm wondering if this is an issue with my script though or not? as I can run my rclone copy "/home/admin/web/domain.com/public_html" "gdrive:public_html" command in ssh perfectly fine.

I am running Centos 7 and Vesta CP if it's of any use.

This is a really minor question but why do:

MYVAR=value; export MYVAR

vs

export MYVAR=value

Is there a difference?

1 Like

Nah, not really. Just old school I guess as I was in the habit of doing it that way rather than just one line.

I suppose I could clean that up for tidiness.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.