PHP code example of zenstruck / schedule-bundle
1. Go to this page and download the library: Download zenstruck/schedule-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zenstruck / schedule-bundle example snippets
// src/Schedule/AppScheduleBuilder.php
namespace App\Schedule;
use Zenstruck\ScheduleBundle\Schedule;
use Zenstruck\ScheduleBundle\Schedule\ScheduleBuilder;
class AppScheduleBuilder implements ScheduleBuilder
{
public function buildSchedule(Schedule $schedule): void
{
$schedule
->timezone('UTC')
->environments('prod')
;
$schedule->addCommand('app:send-weekly-report --detailed')
->description('Send the weekly report to users.')
->sundays()
->at(1)
;
// ...
}
}