[GH-ISSUE #961] Support for High-Frequency Millisecond-Level Scheduled Tasks #1481

Closed
opened 2026-03-07 22:09:54 +03:00 by kerem · 1 comment
Owner

Originally created by @missish on GitHub (Nov 8, 2024).
Original GitHub issue: https://github.com/hibiken/asynq/issues/961

Originally assigned to: @hibiken, @kamikazechaser on GitHub.

Hi asynq team,

Thank you for the fantastic work on asynq. I’m a big fan of this library, and it has been very helpful in my projects. However, there’s one feature that I believe would significantly enhance its utility: support for high-frequency, millisecond-level scheduled tasks.

Feature Request:

I’d like to request support for scheduling tasks with sub-second intervals, specifically on the millisecond level. Currently, it appears that asynq doesn’t support intervals shorter than one second. Adding this capability would make asynq a great fit for applications that require high-frequency processing.

For reference, a library like gocron has implemented this with a feature called DurationJob, which allows scheduling tasks with any duration, including millisecond-level intervals (see documentation). A similar implementation in asynq would be a game-changer for use cases requiring more precise, frequent scheduling.

Example Use Cases:

Real-time data processing pipelines
High-frequency health checks or pings
Rapid polling mechanisms for APIs or data sources
Proposed Solution:

One way to implement this might be to enhance the Scheduler to accept durations specified in milliseconds, or add a new scheduling method that can handle sub-second intervals.

Thank you for considering this feature request! Please let me know if I can provide any additional details or if there’s any way I can contribute.

Originally created by @missish on GitHub (Nov 8, 2024). Original GitHub issue: https://github.com/hibiken/asynq/issues/961 Originally assigned to: @hibiken, @kamikazechaser on GitHub. Hi asynq team, Thank you for the fantastic work on asynq. I’m a big fan of this library, and it has been very helpful in my projects. However, there’s one feature that I believe would significantly enhance its utility: support for high-frequency, millisecond-level scheduled tasks. Feature Request: I’d like to request support for scheduling tasks with sub-second intervals, specifically on the millisecond level. Currently, it appears that asynq doesn’t support intervals shorter than one second. Adding this capability would make asynq a great fit for applications that require high-frequency processing. For reference, a library like gocron has implemented this with a feature called DurationJob, which allows scheduling tasks with any duration, including millisecond-level intervals ([see documentation](https://pkg.go.dev/github.com/go-co-op/gocron/v2#DurationJob)). A similar implementation in asynq would be a game-changer for use cases requiring more precise, frequent scheduling. Example Use Cases: Real-time data processing pipelines High-frequency health checks or pings Rapid polling mechanisms for APIs or data sources Proposed Solution: One way to implement this might be to enhance the Scheduler to accept durations specified in milliseconds, or add a new scheduling method that can handle sub-second intervals. Thank you for considering this feature request! Please let me know if I can provide any additional details or if there’s any way I can contribute.
kerem 2026-03-07 22:09:54 +03:00
Author
Owner

@kamikazechaser commented on GitHub (Nov 13, 2024):

to enhance the Scheduler to accept durations specified in milliseconds

This library uses robfig/cron/v3 which doesn't support sub-second cron spec. It will be impossible to add without refactoring the entire scheduler.

<!-- gh-comment-id:2472405887 --> @kamikazechaser commented on GitHub (Nov 13, 2024): > to enhance the Scheduler to accept durations specified in milliseconds This library uses robfig/cron/v3 which doesn't support sub-second cron spec. It will be impossible to add without refactoring the entire scheduler.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/asynq#1481
No description provided.