Skip to main content

Cron for humans - schedule tasks with natural language

Project description

Run Tests & Linters

Tickr

Cron for humans - tickr tasks with natural language

A simple, cross-platform task scheduler that's easier to use than cron, with human-readable syntax and built-in logging.

Features

  • 📝 Natural language scheduling - "every 5 minutes", "every monday at 9am"
  • 💾 Persistent storage - tasks survive restarts
  • 📊 Built-in logging - track all executions with stdout/stderr
  • 🔄 Retry logic - automatically retry failed tasks
  • ⏱️ Timeout support - kill long-running tasks
  • 🖥️ Cross-platform - works on Linux, macOS, and Windows
  • 🎯 Simple CLI - no complex cron syntax to remember

Quick Start

Installation

pip install tickr-cron

Or with pipx (recommended):

pipx install tickr-cron

Add Your First Task

# Run a backup script every day at 2am
tickr add backup-db --run "python backup.py" --when "every day at 2:00"

# Check on a service every 5 minutes
tickr add health-check --run "curl https://myapp.com/health" --when "every 5 minutes"

# Send a weekly report
tickr add weekly-report --run "./send_report.sh" --when "every monday at 9:00"

Start the Daemon

# Start in background (Unix-like systems)
tickr daemon

# Or run in foreground (useful for debugging/Docker)
tickr daemon --foreground

View Your Tasks

# List all tasks
tickr list

# Detailed view
tickr list --verbose

# Check execution history
tickr logs backup-db

# Check daemon status
tickr status

Supported tickr Formats

Interval-based

  • every 5 minutes - every N minutes
  • every hour - every N hours
  • every 3 days - every N days

Time-based

  • every day at 14:30 - daily at specific time
  • every monday at 9:00 - weekly on specific day
  • every weekday at 8:00 - Monday-Friday at specific time

Day-based

  • every monday - every specific weekday
  • every friday - any day of the week
  • every weekday - Monday through Friday

CLI Commands

tickr add

Add a new scheduled task.

tickr add <task_name> --run <command> --when <schedule> [options]

Options:
  --timeout SECONDS     Kill task if runs longer than this
  --retries N           Retry N times on failure
  --retry-delay SECONDS Wait between retries (default: 60)

Examples:

# Simple task
tickr add my-task --run "echo hello" --when "every 5 minutes"

# With timeout and retries
tickr add api-check \
  --run "curl https://api.example.com" \
  --when "every hour" \
  --timeout 30 \
  --retries 3 \
  --retry-delay 120

tickr list

Show all scheduled tasks.

tickr list [--verbose]

tickr run

Execute a task immediately (ignores schedule).

tickr run <task_name>

tickr logs

View execution history for a task.

tickr logs <task_name> [--limit N] [--failed-only]

Options:
  --limit N         Show last N runs (default: 10)
  --failed-only     Only show failed executions

tickr enable/disable

Enable or disable a task without deleting it.

tickr disable <task_name>
tickr enable <task_name>

tickr remove

Delete a task and all its execution history.

tickr remove <task_name>

tickr daemon

Start the tickr daemon.

tickr daemon [--foreground]

Options:
  --foreground    Don't daemonize (useful for debugging/Docker)

tickr status

Show daemon status and next scheduled task.

tickr status

Advanced Usage

Retry Failed Tasks

tickr add flaky-api \
  --run "python sync_data.py" \
  --when "every hour" \
  --retries 3 \
  --retry-delay 300

If the task fails, it will retry 3 times with a 5-minute delay between attempts.

Timeout Long-Running Tasks

tickr add slow-task \
  --run "./long_process.sh" \
  --when "every day at 3am" \
  --timeout 3600

The task will be killed if it runs longer than 1 hour (3600 seconds).

Run in Docker

FROM python:3.11-slim

RUN pip install tickr

# Add your scheduled tasks
RUN tickr add my-task --run "python app.py" --when "every hour"

# Run daemon in foreground
CMD ["tickr", "daemon", "--foreground"]

Configuration

All data is stored in ~/.tickr/:

  • tickr.db - SQLite database with tasks and execution history
  • daemon.pid - PID file for the running daemon
  • daemon.log - Daemon logs (rotated at 10MB)

Project details


Download files

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

Source Distribution

tickr_cron-1.0.4.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

tickr_cron-1.0.4-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file tickr_cron-1.0.4.tar.gz.

File metadata

  • Download URL: tickr_cron-1.0.4.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for tickr_cron-1.0.4.tar.gz
Algorithm Hash digest
SHA256 99f93cfd8d4a8eea5ecbf90a6391ce06d7b934624f2c4a53441aad5b51298786
MD5 7c1f05555433d3e6d7f26ed41854b464
BLAKE2b-256 262fe3dd6783daa5a62ec7856bb3118005607b42e43f5d5b270bdd8e472297ba

See more details on using hashes here.

File details

Details for the file tickr_cron-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: tickr_cron-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for tickr_cron-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e65c829687d8353cb91f0c0ed7fcf73afe05cf0c581876597453967dc793aef9
MD5 24087f14cd95bc5be398376a32179aad
BLAKE2b-256 6a028e5846475784a9c9b2cf3aacf896908b9a826db078bc68981881341155c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page