initial commit
This commit is contained in:
30
vendor/symfony/maker-bundle/templates/scheduler/Schedule.tpl.php
vendored
Normal file
30
vendor/symfony/maker-bundle/templates/scheduler/Schedule.tpl.php
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<?= "<?php\n" ?>
|
||||
|
||||
namespace <?= $namespace; ?>;
|
||||
|
||||
<?= $use_statements; ?>
|
||||
|
||||
#[AsSchedule<?php if ($has_transport_name): ?>('<?= $transport_name; ?>')<?php endif ?>]
|
||||
final class <?= $class_name; ?> implements ScheduleProviderInterface
|
||||
{
|
||||
public function __construct(
|
||||
private CacheInterface $cache,
|
||||
) {
|
||||
}
|
||||
|
||||
public function getSchedule(): Schedule
|
||||
{
|
||||
return (new Schedule())
|
||||
->add(
|
||||
<?php if ($has_custom_message): ?>
|
||||
// @TODO - Modify the frequency to suite your needs
|
||||
RecurringMessage::every('1 hour', new <?= $message_class_name; ?>()),
|
||||
<?php else: ?>
|
||||
// @TODO - Create a Message to schedule
|
||||
// RecurringMessage::every('1 hour', new App\Message\Message()),
|
||||
<?php endif ?>
|
||||
)
|
||||
->stateful($this->cache)
|
||||
;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user