Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In a Linux environment, an administrator needs to schedule a complex job that involves executing a series of commands every Sunday at 2 : 0
In a Linux environment, an administrator needs to schedule a complex job that involves executing a series of commands every Sunday at : AM The job has dependencies, requires elevated privileges for certain commands, and the output must be captured in a log file.
Which option is the most suitable approach?
Pick ONE option
Create a systemd timer unit.
Configure the timer unit to run every Sunday at : AM
Write a custom script containing the necessary commands and dependencies.
Ensure the custom script has appropriate permissions.
Direct the output of the custom script to a designated log file.
option
Create a custom script that includes the required commands and their dependencies.
Set appropriate permission settings for the custom script:
Configure the script to redirect the output to a designated log file.
Utilize the at command to schedule the execution of the custom script.
Schedule the script to run every Sunday at : AM using the at command.
option
Create a custom script that includes the required commands and their dependencies.
Adjust the permissions within the custom script to ensure proper execution.
Set up a crontab entry for the root user.
Configure the crontab entry to run every Sunday at : AM
Modify the custom script to redirect the output to a designated log file.
option
Create a custom systemd target unit.
Define the target unit to encompass the job's dependencies and commands.
Configure the target unit to trigger every Sunday at : AM
Ensure appropriate permissions are set within the target unit.
Implement log file handling within the target unit to capture the output.
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