Giter Site home page Giter Site logo

md-systems / ultimate_cron Goto Github PK

View Code? Open in Web Editor NEW
3.0 10.0 7.0 985 KB

Drupal 8 Ultimate Cron Port. Moved to D.O, do not use this anymore.

Home Page: https://www.drupal.org/project/ultimate_cron

CSS 0.48% HTML 0.90% PHP 83.89% JavaScript 14.74%

ultimate_cron's Introduction

Credits
-------

Thanks to Mark James for the icons
  http://www.famfamfam.com/lab/icons/silk/


Example code:


// Default cron-function, configurable through /admin/config/system/cron
function mymodule_cron() {
  // Do some stuff ...
}


// Define custom cron functions.
function mymodule_cronapi($op, $job = NULL) {
  return array(
    'mymodule_cronjob_1' => array(
      'title' => 'Cron-1 Handler',
      'scheduler' => array(
        'name' => 'crontab',
        'crontab' => array(
          'rules' => array('*/13 * * * *'),
        ),
      ),
    ),
    'mymodule_cronjob_2' => array(
      'title' => 'Cron-2 Handler',
      'callback' => 'mymodule_somefunction',
      'scheduler' => array(
        'name' => 'crontab',
        'crontab' => array(
          'rules' => array('0 0 1 * *'),
        ),
      ),
    ),
    'mymodule_cronjob_3' => array(
      'title' => 'Cron-3 Handler',
    ),
  );
}

// Custom cron-function
function mymodule_cronjob_1($job) {
  // Do some stuff ...
}

// Custom cron-function
function mymodule_somefunction($job) {
  // Do some stuff ...
}

// Custom cron-function
function mymodule_cronjob_3($job) {
  // Do some stuff ...
}

// Easy-hook, uses rule: 0+@ * * * *
function mymodule_cron_hourly($job) {
  // Do some stuff
}

// Easy-hook, uses rule: 0+@ 12 * * *
function mymodule_cron_daily($job) {
  // Do some stuff
}

// Easy-hook, uses rule: 0+@ 0 * * *
function mymodule_cron_nightly($job) {
  // Do some stuff
}

// Easy-hook, uses rule: 0+@ 0 * * 1
function mymodule_cron_weekly($job) {
  // Do some stuff
}

// Easy-hook, uses rule: 0+@ 0 1 * *
function mymodule_cron_monthly($job) {
  // Do some stuff
}

// Easy-hook, uses rule: 0+@ 0 1 1 *
function mymodule_cron_yearly($job) {
  // Do some stuff
}


ultimate_cron's People

Contributors

berdir avatar chrisjuhnl avatar danepowell avatar giancarlosotelo avatar gielfeldt avatar juanse254 avatar lks90 avatar mbovan avatar tduong992 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ultimate_cron's Issues

Create log overview for Cron jobs

When Ultimate Cron is set up and Cron jobs are run, they produce logs which are stored in the Database. These logs are not visible anywhere in the UI, so we need to create some overview for those logs.

LoggerBase::log is confusing

The LoggerBase introduces capturing through registering a LogEntry.

However the LogEntry is then used as kindof a channel: Every log call ends up on the same LogEntry...

Also all these things don't have an interface and are just wired lazy - or the interface (ultimate cron LoggerInterface) is empty. We should reuse core interfaces if possible or properly define new ones.

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.