Popularity
2.0
Growing
Activity
1.4
-
138
6
10

Description

hickory is a simple, cross-platform command line tool for scheduling Python scripts.

Programming language: Python
License: MIT License
Tags: Office     Business     Terminals     Schedule     Scheduling     Airflow     Command-line    

README

About

hickory is a simple command line tool for scheduling Python scripts.

Support

Operating System Scheduler
macOS launchd
Linux systemd
Windows โŒ

Install

pip install hickory

Quickstart

Create a file called foo.py:

import datetime
import time

stamp = datetime.datetime.now().strftime("%H:%M:%S")
time.sleep(5)

print(f"Foo - {stamp} + 5 seconds")

Schedule foo.py to execute every ten minutes:

hickory schedule foo.py --every=10minutes

Check the status of all queued schedules:

hickory status

Stop and delete the schedule for foo.py:

hickory kill foo.py

Logs

macOS - logs are stored in the same directory as the scheduled script:

tail -f hickory.log

Linux - logs are written to the journal:

journalctl -f

--every Examples

Repeat
Every ten minutes --every=10minutes
Every day at 10:10 AM [email protected]:10
Every Monday at 10:10 AM [email protected]:10am
Every 10th day of the month at 10:10 AM [email protected]:10am
Every last day of the month at 10:10 AM [email protected]:10am
Every 10th and last day of the month at 10 AM and 10 PM --every=10,[email protected],10pm

--every Table

Interval
10 seconds 10, 10s, 10sec, 10secs, 10seconds
10 minutes 10m, 10min, 10mins, 10minutes
10 hours 10h, 10hr, 10hrs, 10hours
Time
10:00 AM @10, @10am
10:00 PM @22, @10pm
10:10 AM @10:10, @10:10am
10:10 PM @22:10, @10:10pm
Weekday
Monday [email protected], [email protected], [email protected]
Tuesday [email protected], [email protected], [email protected], [email protected]
Wednesday [email protected], [email protected], [email protected], [email protected]
Thursday [email protected], [email protected], [email protected], [email protected], [email protected]
Friday [email protected], [email protected], [email protected]
Saturday [email protected], [email protected], [email protected]
Sunday [email protected], [email protected], [email protected]
Calendar Day
1st [email protected], [email protected]
2nd [email protected], [email protected]
3rd [email protected], [email protected]
4th [email protected], [email protected]
15th [email protected], [email protected]
31st [email protected], [email protected]
Other Day
Every Day [email protected]
Every Weekday [email protected]
End of Month [email protected]