CRON sample

In linux box, set cron at /etc/cron.d/<give-any-name>

Content of the cron:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
HOME=/
## Send email with the output of the script that runs in the cron
[email protected]

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed

## Runs at 9am
0 9 * * * username /f/project-folder/bin/run.sh

## Runs every 15th minute
*/15 * * * * username /f/project-folder/bin/run.sh

## Runs at 9am and 3pm
0 9,15 * * * username /f/project-folder/bin/run.sh

NOTE: In order to get check if the cron setting is correct or not, please using this link https://crontab.guru/

results matching ""

    No results matching ""