Skip to content

CleanTalk/_cron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install:

composer require cleantalk/cron

Using:

<?php

$cron = new $cron_class();
$cron_option = \Drupal::state()->get($cron->getCronOptionName());
if (empty($cron_option)) {
$cron->saveTasks($cron->getDefaultTasks());
}
$tasks_to_run = $cron->checkTasks(); // Check for current tasks. Drop tasks inner counters.

if (
! empty( $tasks_to_run ) && // There is tasks to run
! $rc_class::check() && // Do not doing CRON in remote call action
(
! defined( 'DOING_CRON' ) ||
( defined( 'DOING_CRON' ) && DOING_CRON !== true )
)
){
$cron_res = $cron->runTasks( $tasks_to_run );
// Handle the $cron_res for errors here.
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages