Created
September 13, 2018 10:52
-
-
Save cosmos-sajal/6a74f3c99b03663153509cd2eee1be51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($this->lockHandlerUtil->isDuplicateInstanceRunning()) { | |
// trigger some kind of alert | |
return; | |
} | |
/* | |
actual cron code | |
.... | |
.... | |
*/ | |
// the last line of the cron | |
// this will delete the file myCronPID.txt | |
// when the cron completes the execution | |
$this->lockHandlerUtil->releaseInstance(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment