How to run laravel cron after every 2 weeks or 14 days -


i need run laravel cron after every 2 weeks or 14 days. not found solution this. search on laravel documentation https://laravel.com/docs/5.5/scheduling , found option

->weekly(); 

but runs on weekly. search other option , found laravel schedule task run every 10 days of month work first 10 days of month

$schedule->command('log:test')->cron('0 0 1-10 * *'); 

please me if have solution in advance.

$schedule->command('log:test')->cron('0 0 */14 * *'); 

2017-09-15 00:00:00

2017-09-29 00:00:00

2017-10-01 00:00:00

2017-10-15 00:00:00

2017-10-29 00:00:00

or can run custom

    $schedule->command('log:test')->weekly()->when(function () {         return ((carbon::now()->day % 2) === 1); //bool example     }); 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -