5.2 Cron and Scheduled Jobs Flashcards
A _________ is a script or command designated to run at periodic predetermined intervals.
A cron job is a script or command designated to run at periodic predetermined intervals.
What is a daemon?
A daemon is a computer program that runs as a background process, rather than being directly controlled by an interactive user.
What is Cron?
cron is a robust task scheduler that allows users to schedule repetitive tasks to run on a regular basis.
____________are often started at boot up. While other
____________ respond to network requests and hardware activity, cron is initiated at designated time intervals.
Daemons are often started at boot up. While other
daemons respond to network requests and hardware
activity, cron is initiated at designated time intervals.
Tasks are stored and scheduled in a file called a ___________.
Tasks are stored and scheduled in a file called a crontab (cron table).
- Each user has their own individual, private crontab.
- System crontabs for system level actions.
- Tasks scheduled by users. are run under that user’s privilege level.
- Root users can have a crontab too.
Crontabs come in two varieties. What are they?
- User-level: runs for a specific user under their privilege level.
- System-level: runs for the system as a whole under root privileges.
What is the general syntax for a crontab?
minute hour day-of-month month day-of-week command
What goes in this directory?
/etc/cron/d
custom cron jobs
Lynis is a security scanner used to ____________________.
Lynis is a security scanner used to check a machine for vulnerabilities.
- Generates and saves reports of its findings for administrators to review.
- Offers numerous scan types.
- When will the following
cron
schedules run?*/10 * * * *
At every 10th minute.
- What event is the following
cron
a minute away from?
59 23 31 12 *
New years
What do the following hypothetical cron
likely do?
0 18 * * 1-5 /home/Bob/Sales/sum_of_sales.sh
- Run a script that adds up all the sales for the work day.
2. A weekly automated system upate.
What is a shebang?
Is the commented file declaration at the top of a shell script.
Is the .sh
extension needed for shell scripts?
Nope! As long as the shebang is there, the file should be able to run as a script!
What two characters should come before the filename of a script?
./