NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io
crates.io, #4291 most downloaded on crates.io
Schedule tasks on tokio using cron-like annotation, at an instant or repeat them at a fixed duration. Tasks can optionally be persisted using PostgreSQL or Nats.
Latest stable
0.15.1
Last release 1 years ago
28 Oct 2025
Release timing varies
gaps range from 2 weeks to 12 months
Most releases are documented
notes for 29 of 47 stable releases
2 versions withdrawn
withdrawn after publishing
6 years old
51 releases · first in 2021
Drag across the ruler to compare, or tap a release to open it.
Bugfix release Thank you @thomas-senechal for the PR #106
Bugfix release
Thank you @thomas-senechal for the PR #106
A maintenance release - thank you @JosiahParry for the PR. This includes an update to croner
A maintenance release - thank you @JosiahParry for the PR. This includes an update to croner
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Also - breaking changes, if you're using NATS. Swapped over to the async-nats crate. Default() is no longer available for the NATS stores because crea…
Thank you @nicka101 for the PR on making the Job and Store packages public (so that MetadataStore can be implemented elsewhere).
Also - breaking changes, if you're using NATS. Swapped over to the async-nats crate. Default() is no longer available for the NATS stores because creating a connection is async.
Thank you @kaplanelad for the english-to-cron crate and the issue .
Thank you @kaplanelad for the english-to-cron crate and the issue.
This will enable scheduling like "every 10 seconds".
This is feature gated behind the "english" feature.
Thank you @MGough (and @adrian-kong ) for this.
Thank you @MGough (and @adrian-kong) for this.
If you want to see why croner-rust is preferable, have a look at this comparison.
The interface in creating jobs are incompatible with the previous versions if you were using the FromStr impl from the cron crate.
Thank you @azasypkin for the PR
Thank you @azasypkin for the PR
This fixes a metadatastore bug when using Postgres
JobScheduler::new_with_channel_size(1000).await; The default is 200 when calling JobScheduler::new().await;
Because it uses Tokio for the ctrl+c signal handling, the signal feature only works with Unix.
Because it uses Tokio for the ctrl+c signal handling, the signal feature only works with Unix.
Thank you @SandroHc for this.
Thank you @rlienlaf for the bug fix on the timezone offsets.
Thank you @rlienlaf for the bug fix on the timezone offsets.
Hi all Timezone support has landed, plus a builder API. For now you'll need the builder API to change the TZ of a job.
Hi all
Timezone support has landed, plus a builder API.
For now you'll need the builder API to change the TZ of a job.
Thank you also @marioloko for the added log feature.
Thank you @grahamhub for the report/PR to fix a whitespace issue for PostgreSQL.
Thank you @grahamhub for the report/PR to fix a whitespace issue for PostgreSQL.
Nothing published for this version
There's a race condition on starting the scheduler when using Nats. Rewritten logic around starting the scheduler using a tokio oneshot channel.
There's a race condition on starting the scheduler when using Nats. Rewritten logic around starting the scheduler using a tokio oneshot channel.
.tick() was removed. The MPSC model caused some issues and extra code complexity. Duly culled and sent to the ether.
.tick() was removed. The MPSC model caused some issues and extra code complexity. Duly culled and sent to the ether.
No new features, just a bugfix release.
No new features, just a bugfix release.
Removes the time-rs and oldtime feature (that enables time-rs on chrono). Thanks @imurx for the report.
Removes the time-rs and oldtime feature (that enables time-rs on chrono). Thanks @imurx for the report.
1. Updated some depencies 2. Removed the time crate
An extra function is exposed on the JobScheduler - next_tick_for_job. It takes the JobId as parameter and must be run from an async context.
An extra function is exposed on the JobScheduler - next_tick_for_job. It takes the JobId as parameter and must be run from an async context.
let mut four_s_job_async = Job::new_async("1/4 * * * * *", |uuid, mut l| {
Box::pin(async move {
info!("I run async every 4 seconds id {:?}", uuid);
let next_tick = l.next_tick_for_job(uuid).await;
match next_tick {
Ok(Some(ts)) => info!("Next time for 4s is {:?}", ts),
_ => warn!("Could not get next tick for 4s job"),
}
})
})
.unwrap();
Thanks @hellager for the suggestion.
You can't mix sync and async. This will help.
You can't mix sync and async. This will help.
Thanks @tuck182 - he fixed the shutdown flow.
Thanks @tuck182 - he fixed the shutdown flow.
Nothing published for this version
Expose MetaDataStorage, NotifcationStorage
Expose MetaDataStorage, NotifcationStorage
Nothing published for this version
UUID feature flag bump when using 0.7.6 of tokio-postgres. Thank you @tiqwab for your contribution.
UUID feature flag bump when using 0.7.6 of tokio-postgres. Thank you @tiqwab for your contribution.
Nothing published for this version
The feature flag `has_bytes` enables Prost generated data structures to be used
has_bytes enables Prost generated data structures to be usedNats Jetstream's bucket prefix is configurable. Expose this API on the NatsStoreBuilder
Fix copying Prost compiled file on Windows. Thanks @wormtql for the PR
Nothing published for this version
Adds NatsStoreBuilder to build a Nats store
Nothing published for this version
Nothing published for this version
Job::new and Job::new_async returns a Result that has the Error part being JobSchedulerError (not a Box<&dyn stdErr> as prior).
Nothing published for this version
This release brings persistent storage using either PostgreSQL or Nats. There's also a major refactoring of the innards of the library, but keeping th
This release brings persistent storage using either PostgreSQL or Nats. There's also a major refactoring of the innards of the library, but keeping the API (mostly) the same.
Thank you @vkill and @hgzimmerman for your contributions.
See the Migration Docs. Also check out the Nats integration and PostgreSQL integration docs if you want to use any of the persistent storage modules.
Setup a running Nats instance with Jetream enabled:
docker run --rm -it -p 4222:4222 -p 6222:6222 -p 7222:7222 -p 8222:8222 nats -js -DV
Then run the example:
cargo run --example nats --features="nats_storage tracing-subscriber"
Setup a running PostgreSQL instance:
docker run --rm -it -p 5432:5432 -e POSTGRES_USER="postgres" -e POSTGRES_PASSWORD="" -e POSTGRES_HOST_AUTH_METHOD="trust" postgres:14.1
Then run the example:
POSTGRES_INIT_METADATA=true POSTGRES_INIT_NOTIFICATIONS=true cargo run --example postgres --features="postgres_storage tracing-subscriber"
We've got persistent storage! Using Nats..
We've got persistent storage! Using Nats..
New beta, new architecture it seems. This time it comes with designs (see bottom of the README). If you didn't implement your own scheduler, this version's only big change is the adding a reference of the scheduler when creating/removing notifications of a job. I like this architecture and it made implementing it on top of Nats very easy. I would expect porting it to other storage providers would be easier.
See migration.md for migrating from previous versions to this.
There's some PRs and issues I'd like to get into before doing 0.6.0 release proper. But this one is huge in code and refactoring wise.
The current aim of the 0.6.0 release is to have a way of storing jobs and their statuses.
The current aim of the 0.6.0 release is to have a way of storing jobs and their statuses.
Both the scheduler and the storage are now used as traits and not as concrete implementations. The storage data of the jobs are sequenced using Prost! Protobufs. This allows for the bytes of a job to be stored and retrieved from the job store and then sequenced back into concrete jobs. For beta 1, the existing functionality of in-memory storage are implemented accordingly and considered stable. That is - nothing should break if you use this over 0.5. If it breaks, please file a bug report.
For the user facing API, nothing huge has changed. However, I've added JobSchedulerError as my enum of when things go wrong, replacing Box<dyn Error> in most of the places.
For beta 2, I'll be aiming for Nats.io storage, as this is the itch I wanted to scratch with this crate (end game for my use). I do see the current layout of the code like I wanted it to be for me to implement the Nats.io storage, as it follows a sort-of message driven way of creating jobs and notifications.
Comments are welcome! Speaking of comments - there are lots more eprintln! in this crate now. Please comment if you'd rather not have me implement errors using the log crate. This will be done in beta 2 barring any requests not to.
Adds the shutdown method to the scheduler. This will remove and stop all tasks. There's also a set_shutdown_handler to run an async task after the sch
v0.5
Adds the shutdown method to the scheduler. This will remove and stop all tasks.
There's also a set_shutdown_handler to run an async task after the scheduler was stopped. Conversely, remove_shutdown_handler removes the shutdown handler.
signal feature flagOptional. Adds shutdown_on_signal and shutdown_on_ctrl_c to the scheduler.
Both shuts the system down (stops the scheduler, removes all the tasks) when a signal
was received (with ctrl+c a specific one).
Add (and remove) notifications whenever your job was started, completed or removed.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.