问题
Please Help.
I have created a API which will call a sms API and send the sms. My code flow is like - The API(Mobile Number as parameter) hit my code - I have storing the mobile in my database and then dispatch a job.
in my ubuntu serve I have added this line in crontab -e
editor
* * * * * cd /var/www/html/project&& php /var/www/html/project/artisan schedule:run >> /dev/null 2>&1
and my scheduler in laravel is
$schedule->exec('php artisan queue:work')->everyMinute();
and I tried sudo service cron status
its showing
the report seems, its creating lot of cron jobs. I dont understand where I missed , what mistake I did here.
is it because of my laravel scheduler code?
In my Job I am hitting my Database. So it showing too many connection error in laravel
Please help my to figure this out.
THanks
来源:https://stackoverflow.com/questions/62738305/cron-job-in-ubuntu-creating-multiple-instances