Run a command every 24 hours and 5 minutes with crontab

3

I know that for a command to be executed every 24 hours it must be

0 7 * * * [comando]

But, for example, to run every 24 and 5 minutes Is there a way to do it?

    
asked by ImHarvol 21.12.2018 в 21:27
source

1 answer

3

Small error, although it works.

0 7 * * * [comando]

Your command means, at zero minutes of the seventh hour daily. That is, at 7:00 in your time zone.

If what you want is every 24 hours and 5 minutes it is.

5 */24 * * * [comando]

That you can read it in man 5 crontab , that every time you want to run something of the form "each x unit" is something of the form

#unidades
#minuto  #hora  #dia  #mes  #dia de la semana
  */2     */2    */2   etc

Which means that it will execute a command every 2 minutes, every 2 hours, every 2 days, etc.

5 */24 * * * [comando]

He interprets it as, running a command after 5 minutes, every 24 hours.

Now that if, as I understand it, you want something at a specific time, it would be something close to what you put in.

5 7 * * * [comando]

What would you understand as the execution of that task every 7:05 of the time zone.

    
answered by 21.12.2018 в 21:42