The question is provided by a training agency.
You are debugging a problem in a cron script. You think the problem is
related to the cron script execution time. How does Magento react when
it has to run a scheduled job but a previous instance of the job is
still running? (Choose one)A. This situation is impossible because all cron jobs are executed in
a single PHP thread, so the next job may only be executed after the
previous is finished.B. Magento executes every job by schedule in a parallel PHP thread, so
it is possible that the latter instance will be completed before the
former one.C. Magento is monitoring hanging cron processes and kills ones that
take more than one minute.D. Magento issues a lock file for each cron job and does not run the
next instance of a job if the previous one is still running.
We know C
is incorrect, but what about B
and D
?
I think the behavior depends on the configuration, eg: use_separate_process
.
Can anyone answer this question with explanation?(I contacted the question author but no reply)