Running a cron job on Linux every six hours

Viewed 200424

How can I run command every six hours every day?

I tried the following, but it did not work:

/6 * * * * *  mycommand
7 Answers

Please keep attention at this syntax:

* */6 * * *

This means 60 times (every minute) every 6 hours,

not

one time every 6 hours.

0 */6 * * *

crontab every 6 hours is a commonly used cron schedule.

You need to use *

0 */6 * * * /path/to/mycommand

Also you can refer to https://crontab.guru/ which will help you in scheduling better...

Try:

0 */6 * * * command

. * has to

Related