Run crontab (cron jobs) Every 10 Minutes

ww‮w‬.lautturi.com
Run crontab (cron jobs) Every 10 Minutes

To run a cron job every 10 minutes, you can use the following configuration in the crontab file:

*/10 * * * * /path/to/command

This configuration will run the specified command every 10 minutes.

To edit your crontab file, you can use the crontab -e command. This will open the crontab file in a text editor, where you can add or edit cron job entries.

Here is an example of how to add a cron job that runs a script called myscript.sh every 10 minutes:

  1. Open the crontab file by typing the following command in the terminal:
crontab -e
  1. Add the following line to the crontab file:
*/10 * * * * /path/to/myscript.sh

Replace /path/to/myscript.sh with the actual path to the script on your system.

  1. Save the crontab file and exit the text editor.

The cron daemon will automatically pick up the changes and start running the script every 10 minutes.

Note: The crontab file uses a specific syntax to specify when cron jobs should be run. Each line in the file represents a cron job and consists of six fields separated by spaces: minute, hour, day of month, month, day of week, and the command to be run. The first five fields can contain a number or a *, which represents all possible values. In the example above, the */10 in the first field indicates that the command should be run every 10 minutes.

For more information about the crontab file syntax and how to use cron to schedule tasks on a Linux or Unix system, you can refer to the crontab man page by running man crontab in the terminal.

Created Time:2017-10-30 14:27:16  Author:lautturi