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

Cron like checking/scheduler Adding apscheduler #2735

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dgtlmoon
Copy link
Owner

@dgtlmoon dgtlmoon commented Oct 22, 2024

solution for #1092

  • needs sqlite or similar (only should be enabled when this is setup?)
  • needs to keep the item scheduled until it has ran (incase it gets scheduled but cdio restarted)
    async with AsyncScheduler(data_store) as scheduler:
        await scheduler.add_schedule(tick, IntervalTrigger(seconds=1), id="tick")
        await scheduler.run_until_stopped()

maybe interval trigger could be based on the current seconds/days/etc too

is in-memory-scheduler enough? pgsql/mysql etc not needed?

https://apscheduler.readthedocs.io/en/3.x/

APScheduler has three built-in scheduling systems you can use:

  • Cron-style scheduling (with optional start/end times)
  • Interval-based execution (runs jobs on even intervals, with optional start/end times)
  • One-off delayed execution (runs jobs once, on a set date/time)

use the interval based execution (what we have now) first

@dgtlmoon dgtlmoon marked this pull request as draft October 22, 2024 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant