- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Scheduling Processes in SUSE Linux Enterprise
In this hands-on lab, we will be looking at scheduling processes to run on a schedule. We will perform some troubleshooting on a user account to ensure the process is working correctly, and then we will create a task as the `root` user to ensure our time is synced correctly on our server.

Lab Info
Table of Contents
-
Challenge
Verify the `testuser` Can Create Scheduled Tasks
-
Access the
testuser
's account:su - testuser
The password is
Password!
-
Create a file named
test.sh
that echoes the string "this is a test" into anexamplefile
:vim test.sh ++contents #! /bin/bash echo 'this is a test' >> /home/testuser/examplefile
Save and exit the file with Escape and then Shift+ZZ.
-
Make the file executable:
chmod +x test.sh
-
Open
testuser
's crontab and add a task:crontab -e
-
Add this line:
* * * * * /home/testuser/test.sh
Save and exit with Escape and then Shift+ZZ.
-
Tail the file
examplefile
and ensure a line is appended every minute:tail -F examplefile
-
Hit Ctrl+C to quit.
-
Remove the task from the crontab:
crontab -e
-
On the line with the task, press
d
twice. -
Save and exit with Escape and then Shift+ZZ.
-
-
Challenge
Create a Task as `root` that Syncs the System Clock to the Hardware Clock
-
Open the
root
crontab:sudo -i crontab -e
-
Add the task to run the backup at 3 AM:
SHELL=/bin/bash PATH=/sbin 00 03 * * * /usr/local/bin/customback /opt/programdata
Save and exit with Escape+X.
-
Verify the task exists in the
root
crontab:sudo -i crontab -l
-
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.