change scheduled jobs into a chain

This commit is contained in:
omair saleh
2021-09-02 22:32:01 +08:00
parent 8e05c287b8
commit 51f1b3adcb
+8 -5
View File
@@ -29,11 +29,14 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
$schedule->job(FetchWarehouseReceiveListFromVTPortalJob::class)->dailyAt('21:00');
$schedule->job(FetchLoadedContainersFromVTPortalJob::class)->dailyAt('21:15');
$schedule->job(FetchPackingListFromVTPortalJob::class)->dailyAt('21:30');
$schedule->job(FetchContainersStatusUpdateFromVTPortalJob::class)->dailyAt('21:45');
$schedule->job(FetchDeliveryListFromVTPortalJob::class)->dailyAt('22:00');
$schedule->call(function(){
FetchWarehouseReceiveListFromVTPortalJob::withChain([
new FetchLoadedContainersFromVTPortalJob,
new FetchPackingListFromVTPortalJob,
new FetchContainersStatusUpdateFromVTPortalJob,
new FetchDeliveryListFromVTPortalJob
])->dispatch();
})->dailyAt('21:00');
}
/**