A time-based computer wake-up and job execution scheduler. Runs a job (commands or shell scripts) at fixed intervals. Useful for recurrently scheduled jobs with plenty of idle time between executions, e.g. daily or weekly backups.
- Executes a job recurrently at a fixed
interval(how often to execute) andoffset(when exactly execute within interval) - Schedules machine boot up and shutdowns machine with a specified
warm-upperiod (how long wake the machine in advance) - Keeps machine running and ready to log in after boot up for a specified
maintenance windowduration (how long to wait for login after boot) - Keeps machine running when somebody is logged in until all users log out
- Skips shutdown and keeps machine running when remaining time to the next job would be too short - shorter than specified
minimal shutdowntime (the time when turning the machine off wouldn't be reliable) - Handles long-running and concurrent jobs properly
- Doesn't turn off the machine until all jobs are finished
- Doesn't miss a job during maintenance when somebody is logged in
- Keeps the machine running when planning the next wake or shutdown fails
- Linux with systemd
- RTC (real-time clock) system and power off ability - almost all common PC compatible systems
- System
boot at a specified date and time,wake up from S5 (off mode)orpower on from S5 by RTC alarmability
To check the RTC system is present (usually rtc0):
ls /sys/class/rtcTo test RTC wake alarm works - the computer should boot up in 60 seconds:
rtcwake -m off -s 60- Set up the machine BIOS or UEFI to:
- turn the machine on after power failure, e.g.
power failure recovery:always on - wake on LAN, e.g.
wake on LAN,power on by LAN,resume by LAN,remote wake uporwake on wireless LAN:on
- turn the machine on after power failure, e.g.
- Set up the machine's OS clock to synchronize with
NTPor another synchronization mechanism
- All times are compared with Unix time UTC time zone