Doubts in the operation of a CRON task, No and how to SCHEDULE, but the same function [duplicate]

-1

I have a question in a task schedule on CRON and would like more clarification on how it works.

If I have a task running every minute, and this task for example takes longer than 1 minute, EX: I have a report with more than 20,000 lines and running a routine traversing 15,000 lines and executing a task of comparison takes two minutes.

Then the CRON Schedule is scheduled to run again in the next 60 seconds.

Does the previously scheduled task end or end? Even if the second one has been called.

Remember that this is an example above to know how it works, and the doubt is not how to Schedule and yes how does the queue work

    
asked by anonymous 03.09.2018 / 22:06

1 answer

0

cron respects the schedule you've done, if it's every 1 minute, it will start the script every 1 minute regardless of whether the previous run is finished.

You can, in your script or program, implement a queue or something of the type that will make the next process wait for the end of the run.

    
03.09.2018 / 22:26