The result is different when use run it from the command line and when you invoke it from crontab or fcrontab..
I have a bash script that runs two Python scripts and uploads two png outputs to a website using curl and the entire contents of the directory to Google Drive using Rclone. The first Python script generates five files (one Excel, two CSV, one PNG and one SVG) and the second two files (one PNG and one SVG). Curl uploads the two PNG to the website.
Rclone uploads only what have changed. In both cases:
The two Python script are only uploaded if they have changed.
The CSV and Excel files are always uploaded (even if identical).
The PNG and SVG are always uploaded if they are different.
However:
If I run the bash file from the command line the image files are uploaded if they have been newly generated even if they are identical. I guess it is checking the modification date and time.
However, when run from crontab or fcrontab the image files are only uploaded if they are different. I guess it is doing a checksum...
Now the question is, who is governing this behaviour Rclone or Google Drive?
Is there a way to control it?
The files are few and small so I do not mind having them overwritten every time.
What is your rclone version (output from rclone version)
rclone v1.36
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Operating System: Ubuntu 18.04.4 LTS
Kernel: Linux 4.19.112
Architecture: x86-64
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone copy /tmp/ remote:tmp/
A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)
The rclone version you are using is over two years old so you should update that.
If you run the command and use -vv, we can see why something is being updated. Add that to your command share the log. If you are using through cron you can add --log-file /tmp/somelog.log as well to capture the output to a file.
Yes, you are right. I think that the problem is that the files are not being created when calling the scripts from cron. That is the problem. It has nothing to do with Rclone. Sorry about that.
Yes, thanks a million! It was a Python problem with MatPlotLib. When called directly, by default, it expects a display to be available. From crontab there is no display. So I needed to add an option to my Python scripts in order to account for that fact...