Skip to content
A PHP cron task manager for MVC-type applications
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples #16 undefined variable fix Jun 12, 2017
src dependencies were updated Aug 12, 2018
tests dependencies were updated Aug 12, 2018
.codeclimate.yml
.gitignore minor fixes, require attribute for forms Feb 22, 2016
.travis.yml
LICENSE
README.md
codeclimate.sh tests, codeclimate settings Feb 7, 2016
composer.json dependencies were updated Aug 12, 2018
phpunit.xml codeclimate config Feb 4, 2016

README.md

PHP Cron tasks manager

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 Code Climate Test Coverage License Gitter

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 mult1mate/cron-manager

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

See also examples for ActiveRecord, CodeIgniter, Yii2, File storage

Screenshots

Tasks list Report Logs Import and export

See Live Demo for more!

Changelog

  • v1.1.0 - File storage models added
You can’t perform that action at this time.