Cron Flashcards
1
Q
crontab
A
Used to view and edit user cron table file In /etc/cron.hourly /etc/cron.daily /etc/cron.weekly /etc/cron.monthly /etc/cron.d: whole system /etc/cron.deny: lists users restricted from cron jobs. -e: edit -l: list -r: remove -u: for specified user.
2
Q
Cron job formatting
A
Minute, hour, day of month, month, day of week, username, command.
Ex: 0 5 * * sat (or 6)
3
Q
at
A
One time job at specified time. enters text editor by default which can be exited via Ctrl+d
-f: file path for script with time after.
Ex: now +5 minutes
9:30 PM Tuesday
4
Q
atq
A
View job queue
5
Q
atrm
A
Remove numbered job.
6
Q
at.allow and at.deny
A
In /etc/
Determines which users can set at jobs.
7
Q
Transient Timers
A
Setup by systemd-run command. Do not require service file.
8
Q
Timer unit files
A
[Timer] Monotonic On BootSec=, OnUnitActiveSec= Realtime OnCalendar= Unit= [Install] WantedBy=timers.target
9
Q
systemctl list-timers =all
A
Lists all timers on systems
Note: can also view systemctl cat
10
Q
systemd-run -onactive=
A
Can create transient timer, does not require service file.