b3nnu3/spryker-scheduler

There is no license information available for the latest version (dev-master) of this package.

Scheduler module

Maintainers

👁 b3nnu3

Package info

github.com/B3NNU3/spryker-scheduler

pkg:composer/b3nnu3/spryker-scheduler

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

dev-master 2020-01-28 14:25 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Unknown License b44174122c8ce5794ac30b228611470f8a412791

This package is not auto-updated.

Last update: 2026-06-25 19:24:20 UTC


README

Replace Jenkins in your spryker setup

Use peppeocchi/php-cron-scheduler instead of Jenkins to save resources.

Installation

composer require B3NNU3/spryker-scheduler

Copy files from: config/Zed/cronjobs to YOUR_PROJECT_ROOT/config/Zed/cronjobs/
Add the following to src/Pyz/Zed/Console/ConsoleDependencyProvider.php

[...]
use B3NNU3\Zed\CronScheduler\Communication\Console\CronSchedulerCreate;
use B3NNU3\Zed\CronScheduler\Communication\Console\CronSchedulerExecute;
use B3NNU3\Zed\CronScheduler\Communication\Console\CronSchedulerRemove;
[...]

 /**
 * @param \Spryker\Zed\Kernel\Container $container
 *
 * @return \Symfony\Component\Console\Command\Command[]
 */
 protected function getConsoleCommands(Container $container): array
 {
 $commands = parent::getConsoleCommands($container);

 [...]
 $commands[] = new CronSchedulerExecute();
 $commands[] = new CronSchedulerCreate();
 $commands[] = new CronSchedulerRemove();
 [...]

 return $commands;
 }

run

vendor/bin/console transfer:generate

Run the following to set the scheduler script to your crontab

cron:scheduler:create

Usage

The cron will execute in every minute.
And will run every command from the scheduler.php
If a command starts the scheduler will create a .lock file for it in data/CLI/scheduler/COMMAND_NAME.lock
For more information see peppeocchi/php-cron-scheduler

Miscellaneous

Please also take a look at you install-recipes at /config/install

You should replace the following
Instead of:

 jenkins-down:
 jenkins-stop:
 command: "vendor/bin/console scheduler:clean"
 stores: true

use:

 scheduler-down:
 remove-cron:
 command: "vendor/bin/console cron:scheduler:remove"

and instead of

 jenkins-up:
 jenkins-generate:
 command: "vendor/bin/console scheduler:setup"
 stores: true

 jenkins-enable:
 command: "vendor/bin/console scheduler:resume"
 stores: true

use:

 scheduler-up:
 crons-enable:
 command: "vendor/bin/console cron:scheduler:create"