Open Verkhovskyi opened 2 months ago
This can be achieved through something like cron
. If you set sync_interval
to -1, it will sync once and exit (more info: #35). You can set cron schedule to run the docker container with sync_interval
set to -1 in config.yaml
.
You can combine the one time usage option with a cronjob. For example, below are the two cron jobs that help achieve what you want:
Start the Docker container at 8 AM on weekdays:
0 8 * * 1-5 /usr/bin/docker container start icloud
and
Stop the Docker container at 5 PM on weekdays:
0 17 * * 1-5 /usr/bin/docker container stop icloud
Add these two to crontab using crontab -e
and you're good to go.
sync_interval to -1
does not work currently, see #247
As the one who sleeps in the same room where the server lives, I think it would be nice to be able to set a schedule of synchronization :)
For example, I'd like to allow sync and downloads only on weekdays 8:00 am to 5:00 pm