GithubHelp home page GithubHelp logo

panrus / yii2-cron Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rossmann-it/yii2-cron

0.0 1.0 0.0 170 KB

A PHP cron task manager for Yii2

License: MIT License

PHP 95.63% JavaScript 4.37%

yii2-cron's Introduction

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 of original project by multimate Code Climate Test Coverage License

How this 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 rossmann-it/yii2-cron

Requirements

Configure

  • Create tables if you want to store data in database (use Yii migration)
  • 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 invoked through the manager
  • Make sure that manager is not publicly available

Screenshots

Tasks list Report Logs Import and export

yii2-cron's People

Contributors

ihipop avatar mult1mate avatar panrus avatar rgrellmann avatar rsm-nth avatar sburschewski avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.