mercredi 15 novembre 2017

How to schedule cron job at every minute on daily basis in linux command

I have ran the laravel application. In this application, we could schedule the post based on date time. Once scheduled complete then the post will automatically post to social media like Facebook, Twitter etc..,

I want to ran the multiple cron job at every minute of the day based on user timezone.

For example, I have 400 timezone as of now. These timezone will run every minute of the day using cron job.

app\Console\Kernel.php

$schedule->command('DeleteInActiveUsers:deleteusers')
                 ->everyMinute();

app\Console\Commands\filename.php:

public function handle() {
    $controller = app()->make('App\Http\Controllers\Web\CronsController');
    app()->call([$controller, 'job'], [parameter, 379]);
}

379 - is the timezone id like i want to run 1 to 400 dynamically.

If i will do forloop, it will take moretime to execute the each cron job right. Please advise?

Could you please share how to handle 400 jobs at a time using crontab command or laravel schedule.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2ALvgu4
via IFTTT

Aucun commentaire:

Enregistrer un commentaire