You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried using onOneServer to prevent multiple executions since our system uses auto-scaling. However, the cron job sometimes runs once, and other times it runs multiple times within a 1-microsecond difference. Here are the solutions I've tried, but nothing has worked:
1- I am trying to change the drivers from Redis & MySQL
2- decrease timeout from 30 to 10
3- using usleep for 5 milliseconds
console config:
'mutex' => [
'class' => 'yii\redis\Mutex'
],
cronjobs implementation:
$schedule->call(function(\yii\console\Application $app) {
\Yii::$app->sms->send("966**********", "One Server ".time());
})->everyMinute()->description("cron_every_minute")->onOneServer();
The text was updated successfully, but these errors were encountered:
Hello All
I tried using onOneServer to prevent multiple executions since our system uses auto-scaling. However, the cron job sometimes runs once, and other times it runs multiple times within a 1-microsecond difference. Here are the solutions I've tried, but nothing has worked:
1- I am trying to change the drivers from Redis & MySQL
2- decrease timeout from 30 to 10
3- using usleep for 5 milliseconds
console config:
cronjobs implementation:
The text was updated successfully, but these errors were encountered: