Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 1 : In this 2 part lab, you will perform a series of tasks related to task scheduling using crontab and at , as
Part :
In this part lab, you will perform a series of tasks related to task scheduling using
crontab and at as well as managing background processes using fg
Crontab Task Scheduling:
Objective: Schedule a task to automatically delete temporary files every Sunday at
: PM
Instructions:
Use crontab e to open the crontab editor.
Add an entry to execute the command rm rf tmp every Sunday at : PM
Save and exit the crontab editor.
At OneTime Task Scheduling:
Objective: Schedule a onetime task to print a reminder message in minutes.
Instructions:
Use the at command to schedule the printing of a reminder message in minutes.
Recurring Crontab Task:
Objective: Schedule a task to automatically update the system's package cache
every day at : AM
At OneTime Task Execution:
Objective: Schedule a onetime task to run a script named backup.sh tomorrow at
: AM
Foreground Process Management:
Objective: Start a longrunning command or script in the background and bring it to
the foreground using fg
Instructions:
Start a command eg ping in the background using &
Use the jobs command to list background jobs and their IDs.
Bring the background job to the foreground using fg
Scheduled Task Verification:
Objective: Verify that the scheduled tasks in crontab and at have been correctly set
up
Instructions:
Use crontab l to list the contents of your crontab and ensure that the scheduled
tasks are present.
Use atq to list the pending at jobs and confirm that the onetime task is scheduled.
Temporary Task Scheduling:
Objective: Schedule a onetime task to reboot the system in minutes using at
Cleanup:
Objective: Remove all scheduled tasks and clean up background processes.
Instructions:
Remove all scheduled tasks from crontab using crontab r
Cancel all pending at jobs using atrm $atq q
Terminate any remaining background processes.
Notes:
Ensure that you replace pathtobackupsh with the actual path to the backup script
in Task
Verify the successful scheduling and execution of tasks using appropriate
commands crontab l for crontab, atq for at
Experiment with different background processes and tasks to gain familiarity with
process management command
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started