Answered step by step
Verified Expert Solution
Link Copied!

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 1:
In this 2 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
11:00 PM.
Instructions:
Use crontab -e to open the crontab editor.
Add an entry to execute the command rm -rf /tmp/* every Sunday at 11:00 PM.
Save and exit the crontab editor.
At One-Time Task Scheduling:
Objective: Schedule a one-time task to print a reminder message in 30 minutes.
Instructions:
Use the at command to schedule the printing of a reminder message in 30 minutes.
Recurring Crontab Task:
Objective: Schedule a task to automatically update the system's package cache
every day at 3:00 AM.
At One-Time Task Execution:
Objective: Schedule a one-time task to run a script named backup.sh tomorrow at
8:00 AM.
Foreground Process Management:
Objective: Start a long-running command or script in the background and bring it to
the foreground using fg.
Instructions:
Start a command (e.g., 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 one-time task is scheduled.
Temporary Task Scheduling:
Objective: Schedule a one-time task to reboot the system in 10 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 /path/to/backup.sh with the actual path to the backup script
in Task 4.
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Oracle8I Building Efficient Databases

Authors: Jonathan Lewis

1st Edition

0201715848, 978-0201715842

More Books

Students also viewed these Databases questions