cron Flashcards

1
Q

where is crontab located

A

/etc/crontab

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what does cat crontab show?

A

A list of all scheduled jobs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

how is time displayed in crontab?

A

minute, hour, day, month, day of week

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What do you put for a time field (day, for instance) if you want the jab to always run at that time?

A

*
This might look like: 1 * * * *
which will run on the first minute of every hour

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what comes after the time to execute the task?

A

The user the command will be run under, followed by the command to be executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

command to see all cron jobs for the current user

A

crontab -l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

command to create a cron job

A

crontab -e (for edit)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

create crons for other users

A

crontab -u username -e (or -l or whatever other command you want) (may need to use sudo)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

keyword to make job execute hourly

A

instead of using all the minute day … etc fields, you can just type @hourly (or @daily, @ weekly, etc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly