Giter Site home page Giter Site logo

tduong992 / ultimate_cron Goto Github PK

View Code? Open in Web Editor NEW

This project forked from md-systems/ultimate_cron

0.0 1.0 0.0 960 KB

Drupal 8 Ultimate Cron Port

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

CSS 0.48% HTML 0.90% JavaScript 14.83% PHP 83.79%

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 lks90 avatar chrisjuhnl avatar tduong992 avatar juanse254 avatar gielfeldt avatar danepowell avatar mbovan avatar giancarlosotelo 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.