• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Schedule a Cron Job to run Scripts in Oracle Linux 8.5

  • 00:30 cat /etc/os-release
  • 00:49 vim test.sh
  • 02:05 chmod u+x test.sh
  • 02:18 crontab -e
  • 03:26 cd Downloads
  • 03:46 ls -la
  • 04:05 crontab -l
  • 04:16 crontab -r
{{postValue.id}}

To Schedule a Cron Job to run Scripts in Oracle Linux 8.5

Introduction:

The cron daemon is a long-running process that executes scheduled commands at specific dates and times, either as one-time events or as recurring tasks.

Installation Steps:

Step 1: Check the Version of Oracle Linux by using the below command

[root@linuxhelp linuxhelp]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.5"
ID="ol"

Step 2: Create a file “ test.sh” script at 3:58 PM Add the following lines, Save and quit the file.

[root@linuxhelp linuxhelp]# vim test.sh
touch /home/linuxhelp/Downloads/file1.txt
mkdir /home/linuxhelp/Downloads/folder

Step 3: Grant Permission by using the below command

[root@linuxhelp linuxhelp]# chmod u+x test.sh

Step 4: Assign a Cron job and run the below command.

[root@linuxhelp]# crontab -e
00 04 11 Jun * /home/linuxhelp/test.sh

Step 5: Change Directory by using the below command

[root@linuxhelp linuxhelp]# cd Downloads

Step 6: List the Directory at 04:00PM , The Scheduled job to create file and Directory will be created as shown in the below image.

snap 1

Step 7: To List the Scheduled jobs use the below command.

[root@linuxhelp]# crontab -l
00 04 11 Jun * /home/linuxhelp/test.sh

Step 8: To Remove the Scheduled jobs use the below command.

[root@linuxhelp]# crontab -r

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to Schedule a Cron Job to run Scripts in Oracle Linux 8.5. Your feedback is much welcome.

Tags:
liam
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the use of * * * * * In cron?

A

It is a wildcard for every part of the cron schedule expression. So * * * * * means every minute of every hour of every day of every month and every day of the week

Q

Can cron run multiple commands at the same time?

A

We can run several commands in the same cron job by separating them with a semi-colon ( ; )

Q

Where are crontab logs stored?

A

Crontab logs stored for /var/log/cron

Q

How to Create or Edit a crontab File

A

Create a new crontab file, or edit an existing file using the command $ crontab -e [ username ].

Q

How many cron jobs are too many?

A

The cron daemon has a limit on how many jobs it will run simultaneously. By default, it is 100 jobs

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Owen ?
How to add SSH key to my Gitlab account

I need to add the SSH key in my gitlab account. How to do so ????

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.