Skip to main content

crondir

PyPI Documentation Tests Coverage

Manage your user crontab with snippets in a cron.d directory in your home.

Simplifies the automated management of cron tasks in the user space. Snippets are concatenated from your cron.d into the crontab.

  • Store and manage crontab snippets in separate files
  • Does not interfere with existing crontab entries
  • Backs up crontab each time it builds
  • Everything configurable

Usage

A crontab snippet is a file containing lines to go in a crontab.

To install:

pip install crondir

Add a cron snippet:

crondir add path/to/snippet_name

Remove a cron snippet:

crondir remove snippet_name

List installed cron snippets:

crondir list

Build the crontab from current definitions:

crondir build

Or you may find it easier to skip the install step and run it using uv.

uvx crondir add path/to/snippet_name
uvx crondir remove path/to/snippet_name
uvx crondir list
uvx crondir build

By default, crondir stores crontab snippets in ~/.cron.d/, and creates backups in ~/.cron.d/backups/.

For full command line options, see command documentation

Example

Lets say we're deploying a project with hourly and daily cron tasks, and will be running it from a deploy user. Our project is at /home/deploy/project/

Create a snippet file in our project, cron_tasks, containing the lines to add to the crontab:

0 * * * * /home/deploy/project/bin/hourly_refresh.sh
1 0 * * * /home/deploy/project/bin/daily_refresh.sh

To add this snippet, run:

cd ~
uvx crondir add project/cron_task project_tasks
uvx crondir build

This will:

  • create the dir ~/.cron.d/
  • copy project/cron_task into ~/.cron.d/ as ~/.cron.d/project_tasks
  • rebuild the crontab to include the lines from ~/.cron.d/project_tasks

If we want to remove the snippet, we can run:

cd ~
uvx crondir remove project_tasks
uvx crondir build

This will

  • remove the file ~/.cron.d/project_tasks
  • concatenate all the files in ~/.cron.d
  • add them to the crontab under any existing unmanaged entries

Metadata

Release files for crondir 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crondir 0.3.0
File Size Uploaded
crondir-0.3.0.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crondir 0.3.0
File Interpreter ABI Platform
crondir-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / crondir-0.3.0.tar.gz

Download URL crondir-0.3.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
66c9f8a3ff5e5f8ece3e219e0d0f252e0bbff94788b36f4031ac08f6df3b2026
BLAKE2b-256 checksum
How to use checksums
9ea2acd0e8178371b0cd81f259896760333bd6c3da537bb5928380eb5dd5a20c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2025.

Transparency log

Release files / crondir-0.3.0-py3-none-any.whl

Download URL crondir-0.3.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
21ce1849b554f0453d25eea8d1061ae4184cc5dae6dfb76917043f41148d40a2
BLAKE2b-256 checksum
How to use checksums
d5f1752722e2244e6fbb6c225db3aaa9a94262faf99c0b23ec7c1d93717bd77a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page