RedHat RH202 Question Answer
Add a job on Cron schedule to display Hello World on every two Seconds in terminal 8.
Answer and Explanation:
cat >schedule
*/2 * * * * /bin/echo “Hello World” >/dev/tty8
crontab schedule
Verify using: crontab –l
service crond restart
Cron helps to schedule on recurring events. Pattern of Cron is:
MinuteHourDay of MonthMonth Day of WeekCommands
0-590-231-311-120-7 where 0 and 7 means Sunday.
Note * means every. To execute the command on every two minutes */2.
To add the scheduled file on cron job: crontab filename
To List the Cron Shedule: crontab –l
To Edit the Schedule: crontab –e
To Remove the Schedule: crontab –r