PrepAway - Latest Free Exam Questions & Answers

You have a script called logout-users which will log out inactive users every hour between the hours of 6 p.m

You have a script called logout-users which will log out inactive users every hour between the hours of 6 p.m and 7 a.m., Monday through Friday.

Choose the best option for a crontab entry:

A.
00 18-07 * * 1-5 logout-users

B.
00 6PM-7AM * * Mon-Friday logout-users

C.
* 6-7 * * 1-5 logout-users

D.
* 18,19,20,21,22,23,0,1,2,3,4,5,6,7 * * 1-5 logout-users

Explanation/Reference:
Crontab job format: minute hour day month day/week command in numeric format (if not prefixed with @)

B) not correct
C) would only run every minute from 6AM to 7AM
D) would run every minute from 6PM to 7AM


Leave a Reply