I have a script that takes 3 to 4 minute to execute. I want to call this script on cron call. I already use this in my cron but i got some error. My script give the correct output. But i got this error. when my script executed.
Uncaught coding_exception: Coding error detected, it must be fixed by a programmer: A lock was created but not released at:
Code should look like:
$factory = \core\lock\lock_config::get_lock_factory('type');
$lock = $factory->get_lock(Resource id #956);
$lock->release(); // Locks must ALWAYS be released like this.
what is the issue with it.Please help and give me some suggestion.