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 Request: Add support for cron style scheduled full scan #2513

Closed
JC-comp opened this issue Oct 14, 2023 · 3 comments
Closed

Feature Request: Add support for cron style scheduled full scan #2513

JC-comp opened this issue Oct 14, 2023 · 3 comments
Labels
Feature Request Feature Request | Enhancement Request Implemented
Milestone

Comments

@JC-comp
Copy link
Contributor

JC-comp commented Oct 14, 2023

Is your feature request related to a problem? Please describe.

Currently, a full scan can be triggered by setting monitor_fullscan_frequency, this make the full scan be dependent on monitor_interval and the startup time of the app. In other words, a full scan may happen at undesirable times, for example, we may only want to perform a full scan at midnight when we are not using the drive or on the weekend. But a reboot or app restart will break these rules.

Describe the solution you'd like

An option in config file that support cron style schedules for triggering full scan instead of using a fixed interval.

Describe alternatives you've considered

One quick implementation is a simple scheduler that parses the options in the config and updates the start time of the next full scan over time. We can then check this computed time in monitor loop instead of the loop count.

Additional context

No response

@JC-comp JC-comp added the Feature Request Feature Request | Enhancement Request label Oct 14, 2023
@abraunegg
Copy link
Owner

@JC-comp

An option in config file that support cron style schedules for triggering full scan instead of using a fixed interval

Why cant you use 'cron' normally?

Use 'cron' to schedule a shell script that:

  1. Stops your systemd service that is running --monitor
  2. Runs the command --sync --resync --resync-auth - this has the net effect of performing your full scan
  3. Starts your systemd service again

Essentially what you are asking for here is a way to disable 'monitor_fullscan_frequency' .. I will look at this as part of 'alpha-2' development, where setting 'monitor_fullscan_frequency; to '0' will disable it.

When this is done, you can use 'cron' to schedule what you want to occur, rather than the wheel being re-invented.

@abraunegg
Copy link
Owner

Closing as implemented in v2.5.0-alpha-2 GitHub version: v2.4.25-29-g6db484

@abraunegg
Copy link
Owner

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Repository owner locked as resolved and limited conversation to collaborators Oct 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Request Feature Request | Enhancement Request Implemented
Projects
None yet
Development

No branches or pull requests

2 participants