Write cron job to execute bash script every 5 minute
Jump to turn (6)
- 1Write cron job to execute bash script every 5 minute
- 2How to run this script every 1 minute
- 3create bash script which will list terminal history commands to text file
- 4Script not working, after executing script text file is empty, when I execute co
- 5Write command to run bash script in /etc/crontab every 5 minutes
- 6write script which shows current time of executing command
- User
Write cron job to execute bash script every 5 minute
- Assistant
To execute a bash script every 5 minutes using a cron job, follow these steps:
-
Open the terminal and enter the command
crontab -e. This will open the cron table for editing. -
Add a new line at the end of the file, which represents the cron job you want to create.
-
The general syntax for a cron job is:
code*/5 * * * * /path/to/script.shThis syntax can be read as "execute the script every 5 minutes". Here's a breakdown of the individual fields:
-