Skip to main content

awrise

Wake something on a schedule, let it do one thing, and put it back to sleep.

A simple scheduler for one-off jobs. Store schedules in a JSON file (~/.aither/awrise/jobs.json). Runs jobs that are due using run-due. Idempotent: running it twice in the same window won't execute the same job twice.

Installation

pip install -e .

Usage

Add a job

awrise add --name backup --every 1h --run "rsync -a src/ dest/"
awrise add --name check --every 15m --run "curl http://example.com/health"
awrise add --name deploy --every 2h --run "./deploy.sh"

Intervals: 15m (minutes), 2h (hours), 1d (days).

List jobs

awrise list

Output:

Name                 Interval     Command                              Last Run             Status
----                 --------     -------                              --------             ------
backup               1h           rsync -a src/ dest/                  never                pending
check                15m          curl http://example.com/health       never                pending
deploy               2h           ./deploy.sh                          never                pending

Run due jobs

awrise run-due

This is idempotent. Run it from a cron job, a systemd timer, or anywhere. It executes all jobs whose last_run timestamp is more than interval ago. Records the execution time so running it twice in the same window won't run the same job twice.

Jobs that fail record the failure and do NOT block other jobs.

awrise run-due --quiet  # Suppress output

Remove a job

awrise remove --name backup

Configuration

Store schedules in ~/.aither/awrise/jobs.json by default. Override with:

export AWRISE_HOME=/custom/path

Self-test

awrise --self-test

Verifies:

  • Interval parsing (valid and invalid formats)
  • Idempotency (running twice in same window doesn't execute twice)
  • Empty command rejection
  • Job list/add/remove

Design

The simplest useful scheduler: no daemon, no background process. Store state in JSON. The caller (cron, systemd, your own loop) decides when to call run-due.

  • Idempotent: Last-run timestamp prevents duplicate executions
  • Resilient: Failed jobs don't block other jobs
  • Honest: Refuses unparseable intervals, empty commands, nonexistent jobs

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

awrise-0.1.0.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

awrise-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file awrise-0.1.0.tar.gz.

File metadata

  • Download URL: awrise-0.1.0.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for awrise-0.1.0.tar.gz
Algorithm Hash digest
SHA256 220773d3d9af0127ea0003c3002d83ddb1c19095c31d12d2d928ac999a038b4c
MD5 845f6776f67f20096e93ef62a012ae78
BLAKE2b-256 74d213d9340299680a07ce085cd18348822ddc7b075b70f7529cd8e83f59537d

See more details on using hashes here.

File details

Details for the file awrise-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: awrise-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for awrise-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fcf8e35984609ecb282473d9736b5759ffbf34643a8850d20842ec0a365fd3af
MD5 fc4be249f743a1d2c0f879699b37f9b7
BLAKE2b-256 63a76498b9c03e7cb096d102b9b54c009227b85fe321ffd053a2fe8aa242777e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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