Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

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.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 30m
Published
Clock icon Dec 20, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Verify the `testuser` Can Create Scheduled Tasks

    1. Access the testuser's account:

      su - testuser 
      

      The password is Password!

    2. Create a file named test.sh that echoes the string "this is a test" into an examplefile:

      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.

    3. Make the file executable:

      chmod +x test.sh
      
    4. Open testuser's crontab and add a task:

      crontab -e
      
    5. Add this line:

      * * * * * /home/testuser/test.sh
      

      Save and exit with Escape and then Shift+ZZ.

    6. Tail the file examplefile and ensure a line is appended every minute:

      tail -F examplefile
      
    7. Hit Ctrl+C to quit.

    8. Remove the task from the crontab:

      crontab -e
      
    9. On the line with the task, press d twice.

    10. Save and exit with Escape and then Shift+ZZ.

  2. Challenge

    Create a Task as `root` that Syncs the System Clock to the Hardware Clock

    1. Open the root crontab:

      sudo -i crontab -e
      
    2. 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.

    3. Verify the task exists in the root crontab:

      sudo -i crontab -l
      

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans