From 18c4e7dfeb364abec58138acb0b6290f92c960c6 Mon Sep 17 00:00:00 2001
From: Jaap Jansma <jaap@edeveloper.nl>
Date: Tue, 8 Sep 2015 15:12:48 +0200
Subject: [PATCH] prevent from crashing cron events with max execution time
 error

---
 api/v3/Civirules/Cron.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/api/v3/Civirules/Cron.php b/api/v3/Civirules/Cron.php
index 645ac74..7854fa0 100644
--- a/api/v3/Civirules/Cron.php
+++ b/api/v3/Civirules/Cron.php
@@ -24,6 +24,9 @@ function _civicrm_api3_civirules_cron_spec(&$spec) {
 function civicrm_api3_civirules_cron($params) {
   $returnValues = array();
 
+  //prevent from crashing with a max execution time error
+  set_time_limit(0);
+
   $rules = CRM_Civirules_BAO_Rule::findRulesForCron();
   foreach($rules as $rule) {
     $return = $rule->process();
-- 
GitLab