Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To run a script every 5 minutes using crontab, follow these steps:

  1. Open the crontab editor by typing crontab -e in the terminal.

  2. Add a new line to the crontab file that specifies the timing of the script. To run the script every 5 minutes, use the following syntax:

    */5 * * * * /path/to/your/script.sh

    This line specifies that the script should be run every 5 minutes on any day of the week, any day of the month, and any month of the year.

  3. Save and exit the crontab editor.

Note: Make sure that your script has executable permission. You can set it by running chmod +x /path/to/your/script.sh in the terminal.