Tempus.jl is a lightweight, Quartz-inspired job scheduling library for Julia. It provides an easy-to-use API for defining cron-like schedules and executing jobs at specified times.
- Define jobs using cron-style scheduling expressions
- Support for job execution policies (overlap handling, retries, failure strategies)
- In-memory and file-based job storage backends
- Thread-safe scheduling with concurrency-aware execution
- Dynamic job control (enable, disable, unschedule jobs)
- Supports retry policies with exponential backoff
Tempus.jl is registered in the Julia General registry. You can install it directly from GitHub:
using Pkg
Pkg.add("Tempus")
using Tempus
# Define a job that prints a message every minute
job = Tempus.Job("example_job", "* * * * *", () -> println("Hello from Tempus!"))
# Create an in-memory scheduler
scheduler = Tempus.Scheduler()
# Add the job to the scheduler
push!(scheduler, job)
# Start the scheduler (runs in a background thread)
Tempus.run!(scheduler)
Tempus.disable!(job) # Prevents the job from running
Tempus.enable!(job) # Allows it to run again
Tempus.unschedule!(scheduler, job)
To persist job execution history across restarts, use a file-based store:
store = Tempus.FileStore("jobs.dat")
scheduler = Tempus.Scheduler(store)
Tempus.jl uses a familiar cron syntax for scheduling:
* * * * * → Every minute
0 12 * * * → Every day at noon
*/5 * * * * → Every 5 minutes
# also supports second-level precision
* * * * * * → Every second
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch with your feature or bugfix.
- Submit a pull request with your changes.
Make sure to include tests for any new functionality.
Tempus.jl is licensed under the MIT License.