~anjan/mnc

ref: 0.4 mnc/README.md -rw-r--r-- 975 bytes
3c887e23 — Martin Vahlensieck Remove goroutine 4 months ago

#mnc

mnc (my next cron) opens the user's crontab and echos the time when the next cronjob will be ran.

This program is intended to run with rtcwake on mobile devices to determine when to wake up in time to run cron jobs.

#Install

go build mnc.go

#Usage

Returns the number of seconds until the next cronjob is due, use with crontab -l:

crontab -l | mnc

Mnc reads from stdin and supports only crontab-style input

#Use case

A construction like this is used in Sxmo to wakeup the system when the next cronjob is due:

sxmoscreenlock.sh rtc "$(crontab -l | mnc)"

In this use case, make sure you run this command via st on the phone rather than over ssh.

#Support and patches

Send support questions and patches to the mailing list: public inbox.

Please use git send-email and send a patch to my public inbox.