Closed mshs013 closed 4 years ago
@mshs013 you can try by passing a custom identifier for the function. The identifier is used to create the lock file. And also make sure the scheduler can write to that folder. Did you see if it creates the lock files? If it doesn't then maybe the folder is not writable, of if it does it might be it generates a different id every time. To pass a custom identifier you can do
$scheduler->call(function () {
//my custom code to get data from databse and send notification alert.
}, [], 'myUniqueFnIdentifier')->onlyOne('/var/www/html/storage/log');
@peppeocchi Now it works when I add custom identifier. Thank you ;)
OnlyOne does not work, it runs every min. Bellow my code:
Please help me to fix this.