Hi
I am using Linux Lubuntu 16.04.1 LTS, xenial
I am using insync package insync_1.3.12.36116-trusty_i386, 32-bit computer.
Everything works just fine except I wish to automate syncing for the evening so insync does not use up all my bandwidth during the day when I am working.
From the terminal command line I can use the following to start and stop the process. Both lines work as expected
Start: bash -c 'insync start;sleep 5;insync resume_syncing'
, and
Stop: bash -c 'insync pause_syncing;sleep 5;insync quit'
So I open crontab with crontab -e
and place the following at the end of the crontab file for an every other minute test between 3pm and 4pm. Start on odd minutes and stop on even minutes:
1-59/2 15 * * * bash -c ‘insync start;sleep 5;insync resume_syncing’
2-58/2 15 * * * bash -c ‘insync pause_syncing;sleep 5;insync quit’
The line that pauses and quits insync from within crontab works.
The line that starts and resumes insync from within crontab does not work, although if the insync process is already started (from the command line) and was in a paused state then the command
1-59/2 15 * * * bash -c ‘insync resume_syncing’
does works.
The problem is specifically with the 'insync start'
command.
I have tried many variants of the above using ’ ’ and " " and no quotes and no double quotes.
I have tried linking to a shell script placed within my home directory start_insync.sh
from within crontab. The shell script works when executed from the terminal command line but not when executed by crontab.
I thought it might be to do with paths but since 'insync quit'
works I can’t see why it should be. Does anyone know if 'insync quit'
and 'insync start'
are in the same path. Why would they work in the terminal but not in crontab.
Can anyone shed any light on this.
Thank you