Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Schedule sync #233

Open
Verkhovskyi opened this issue Jun 26, 2024 · 4 comments
Open

[FEATURE] Schedule sync #233

Verkhovskyi opened this issue Jun 26, 2024 · 4 comments
Assignees
Labels
awaiting-info Awaiting more information to proceed

Comments

@Verkhovskyi
Copy link

Verkhovskyi commented Jun 26, 2024

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

@mandarons
Copy link
Owner

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.

@mandarons mandarons added the awaiting-info Awaiting more information to proceed label Jun 27, 2024
@Verkhovskyi
Copy link
Author

#35 is about manual one-time usage, which is nice to have as an option, but very different from subject

@mandarons mandarons removed the awaiting-info Awaiting more information to proceed label Jun 29, 2024
@mandarons
Copy link
Owner

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.

@mandarons mandarons added the awaiting-info Awaiting more information to proceed label Jul 20, 2024
@tymmej
Copy link
Contributor

tymmej commented Jul 26, 2024

sync_interval to -1 does not work currently, see #247

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-info Awaiting more information to proceed
Projects
None yet
Development

No branches or pull requests

3 participants