Exercises

Exercises

Create a cronjob that removes all .txt files from your Desktop directory every 3 minutes.

  • Add a file to your Desktop directory for testing purposes:
touch /home/student/Desktop/example-file.txt
Click Here for Answer

Create a cronjob that would append the current date the first minute of every month to a file called new-month on your Desktop.

Click Here for Answer

Questions and Answers

What is a Crontab?

Click Here for Answer

How do you list the current user’s Crontab?

How do you edit the current user’s Crontab?

How many time parameters are required for a Cronjob?

What would the syntax be to run a cronjob at 5:30 PM every Monday, Wednesday, and Friday?

Click Here for Answer

What is the syntax to run a cronjob at 5:00 AM the first day of every quarter of the year?

Click Here for Answer