E
E
Enniack2017-01-30 15:48:02
linux
Enniack, 2017-01-30 15:48:02

How to set a changing task time?

Essence:
There is a process that runs for 1-2 minutes. After it expires, a timer starts ticking, allowing you to perform this process again only after 60 minutes. Accordingly, if I run this task at the same time, it will often turn out that the timer has not yet ticked its 60 minutes.
Is it possible to set "task time = +1 min from previous execution" in cron?
Or would the correct solution be to crawl into the cron file after each task completion and set a new value based on the task completion time?
Are there any other options?
Thanks to.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2017-01-30
@Enniack

After the process is finished, run the at command , which will start the process again in 61 minutes (with a margin). More or less like this:
at -f commands.sh now + 61 minutes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question