Skip to content

Sberm/cron

Repository files navigation

A simple cron implementation

Compile and run

sh dev.sh

Build

sh build.sh

Run

$ ./cron -h

  Cron by Howard Chu

    -h: Print this message
    -f <crontab file>: Path of the crontab file (default: ~/.crontab.txt)

Run it as a daemon

nohup ./cron > /dev/null &

Notes

This is a cron implementation with my own twist. I was too lazy to read the cron specification details but I'll briefly mention the heuristics I used here.

When using step (e.g. 1-30/2), my cron counts steps starting from the execution of the program. When it reaches a start of a range, it resets and starts counting from that start.

*-10, 40-* is legal here, though illegal in classic cron.

About

A simple cron implementation

Resources

Stars

Watchers

Forks

Packages

No packages published