Download the PHP package dbh/symfony-schedule-bundle without Composer
On this page you can find all versions of the php package dbh/symfony-schedule-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dbh/symfony-schedule-bundle
More information about dbh/symfony-schedule-bundle
Files in dbh/symfony-schedule-bundle
Package symfony-schedule-bundle
Short Description clone from m-adamski/symfony-schedule-bundle
License MIT
Informations about the package symfony-schedule-bundle
JUST FOR PERSONAL USE
Schedule Bundle for Symfony
Bundle for simplifying operations with CRON jobs.
Installation
This Bundle can be installed by Composer:
How to use it?
Bundle provide functionality to manage CRON jobs by configuration from specified file.
We need to create class implementing Dbh\Symfony\ScheduleBundle\Model\ManagerInterface
interface.
Then we need to complete the configuration - create file config/packages/schedule.yaml
and set path to ScheduleManager:
Command schedule configuration
In function schedule
we can configure CRON jobs with required expressions.
For example we want run app:test-command
daily at 12:00:
Schedule class provide many date-time manipulators. This functionality is inspired by Laravel Tasks Scheduling.
Schedule Frequency Options
There are many schedules that you can assign to your task.
Method |
---|
cron($expression) |
everyMinute() |
everyFiveMinutes() |
cron($expression) |
everyMinute() |
everyFiveMinutes() |
everyTenMinutes() |
everyFifteenMinutes() |
everyThirtyMinutes() |
hourly() |
hourlyAt(int $offset) |
daily() |
at(string $time) |
dailyAt(string $time) |
twiceDaily(int $first = 1, int $second = 13) |
weekdays() |
weekends() |
mondays() |
tuesdays() |
wednesdays() |
thursdays() |
fridays() |
saturdays() |
sundays() |
weekly() |
weeklyOn(int $day, string $time = "0:0") |
monthly() |
monthlyOn(int $day = 1, string $time = "0:0") |
twiceMonthly(int $first = 1, int $second = 16) |
quarterly() |
yearly() |
days($days) |
CRON
Now it's enough to insert only one entry into crontab on server:
License
MIT
All versions of symfony-schedule-bundle with dependencies
dragonmantank/cron-expression Version 3.1.*
symfony/console Version 5.4.*
symfony/framework-bundle Version 5.4.*
symfony/lock Version 5.4.*