vendredi 11 novembre 2016

How to know cron job status?

I'm running cron jobs using laravel daily in that i'm sending messages to every client using clickatell api and saving the message status in the database. Here i want to get email when cron job started how many messages are sent, how many are pending and how many are failed.

Iam running my cron jobs like below

protected function schedule(Schedule $schedule)
{       
    $path = public_path().'/cron-jobs/jobs.php';         
    $schedule->command('sms:note')->cron('0 8,16 * * *')->sendOutputTo($path);
}

And path in unix server to run cron job every day.

* * * * * php /var/www/{domain}/artisan schedule:run 1>> /dev/null 2>&1

How can i do this, i have searched for this but i didn't get any idea.

Please help me out!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire