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] defpoll support for polling at a cron-like instants rather than a specific interval #1294

Open
nagisa opened this issue Mar 14, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@nagisa
Copy link

nagisa commented Mar 14, 2025

Description of the requested feature

It would be neat if defpoll supported in addition to the usual interval period a cron-like ability to specify polling at specific instants.

Right now doing something like this requires writing a script and using deflisten which is of course super-general, but ain't nobody is doing that for a clock-like thing (bash doesn't exactly have a sleep_until alike.)

Proposed configuration syntax

;; calls date only when the clock hits 0th second.
(defpoll variable :at "0 * * * * *" "date '+%H:%M'")

Additional context

Implementation wise sleep_until-like function along with the cron crate could be used.

@nagisa nagisa added the enhancement New feature or request label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant