简体   繁体   English

当调度程序功能执行未完成并且调度程序调用该函数时会发生什么

[英]What happens when Scheduler function execution does not get completed and the scheduler recalls the function

I am calling a function via aa scheduler after every 5 seconds.In this function,i am performing some database operations.So my question is,if the function execution is not completed and the scheduler re calls the same function,then what would happen to the function that was currently getting executed. 我每隔5秒就会通过调度程序调用一个函数。在此函数中,我正在执行一些数据库操作。所以我的问题是,如果函数执行未完成并且调度程序重新调用了同一函数,那么会发生什么情况?当前正在执行的功能。

Below is a screenshot of the code with the scheduler. 下面是调度程序代码的屏幕截图。

代码截图

You can just try it. 您可以尝试一下。 There will be something output and tell you that the task is still running, so it won't run again this time, it will be checked next time. 将输出一些信息,告诉您任务仍在运行,因此这次将不再运行,下次将对其进行检查。

For example: 例如:

Execution of job "a (trigger: interval[0:00:01], next run at: 2018-04-25 14:09:57 CST)" skipped: maximum number of running instances reached (1)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM