~sircmpwn/scheduled

scheduled/README -rw-r--r-- 1.2 KiB
1db951c7Sebastian Makefile: add all to .PHONY target 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
				   scheduled

Pronounced "schedule-d", as in "schedule daemon".

Goals:
- Plain-English but well-defined configuration language
- Hierarchical configuration
- Flexible scheduling configuration
- Easy to reconfigure the schedule on the fly

Example config:

	# /etc/schedule/$USER.sched
	mailto sir@cmpwn.com
	timezone UTC

	every Friday at 10:00 do /usr/local/bin/backup
	every month on the 1st do zfs scrub
	on 2022-01-13 at 16:00 do specific-thing

Configured via the sched command:

	sched in 10 minutes do reboot	# like POSIX at(1)
	sched -e			# like crontab -e
	sched -a at 00:00 every day do system-update # append to user schedule
	sched -w [...]			# print next N times a config will trigger

Other notes:
- global config file can set defaults like error email configuration &
  stdout/stderr ring buffer size
- /etc/schedule.d/* has config files which run as the user the file belongs to
  or, if owned by root, they can use the user directive:

  	user nobody
	at 13:00 every day do [...]

  This would allow you to have schedules which run as a user but which the user
  cannot edit.
- separate scheduled processes for each user who has a schedule, running as that
  user, rather than one daemon running as root
- error handling via email or arbitrary commands