voodoo-mobile/yii2-cron

This package is abandoned and no longer maintained. No replacement package was suggested.

Flexible cron tasks manager for MVC-type applications

Installs: 1 722

Dependents: 0

Suggesters: 0

Security: 0

Stars: 9

Watchers: 2

Forks: 69

Type:yii2-module

v1.0.0 2016-02-07 15:21 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:55:59 UTC


README

This is a flexible tasks manager designed for MVC-type applications. It's used instead of standard linux crontab command.

The purpose of this tool is to provide an easy way to manipulate repetitive tasks.

Live Demo

Build Status Test Coverage License

How this is works

Replace all tasks in crontab file with one which will invoke method TaskRunner::checkAndRunTasks().

Import tasks from current crontab file or add them manually. Active tasks will run one by one if current time matches with the task's time expression. Output of tasks can be handled. For each execution will be assigned status:

  • Success if method returned true;
  • Error if method returned false or an exception was caught;
  • Started if task is running or wasn't ended properly.

Features

  • Works with any storage engines
  • Flexible implementation with interfaces
  • Disable, enable and run tasks through tool interface
  • Handle tasks output however you want
  • Time expression helper shows next run dates
  • Monitor runs results
  • Export and import tasks from crontab
  • Add needed method for new task from dropdown

Installation

Install package via Composer

composer require voodoo-mobile/yii2-cron

Requirements

Configure

  • Create tables if you want to store data in database (SQL queries in DbHelper class)
  • Implement TaskInterface and TaskRunInterface or use predefined classes from the Example folder
  • Copy and modify controller and views. Or create your own.
  • Import tasks through interface or add them manually
  • Add new line into crontab file that will invoke TaskRunner::checkAndRunTasks()
  • Disable tasks that will be invoke through the manager
  • Make sure that manager is not publicly available

Screenshots

Tasks list Report Logs Import and export