Let the platform do the work

job_failure_retry

Overview

The job_failure_retry hook executes each time a job fails before its final failure. If you only want action on the final failure, use the job_failure logic hook.

Definition

function job_failure_retry($bean, $event, $arguments){}

Arguments

Name Type Description
bean Object The SchedulersJob object
event String The current event
arguments Array Additional information related to the event (typically empty)

Change Log

Version Note
6.5.0RC1 Added job_failure_retry hook

Example

./custom/modules/SchedulersJobs/logic_hooks.php

<?php

    $hook_version = 1;
    $hook_array = Array();

    $hook_array['job_failure_retry'] = Array();
    $hook_array['job_failure_retry'][] = Array(
        //Processing index. For sorting the array.
        1, 

        //Label. A string value to identify the hook.
        'job_failure_retry example', 

        //The PHP file where your class is located.
        'custom/modules/SchedulersJobs/logic_hooks_class.php', 

        //The class the method is in.
        'logic_hooks_class', 

        //The method to call.
        'job_failure_retry_method' 
    );
?>

./custom/modules/SchedulersJobs/logic_hooks_class.php

<?php

    if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class logic_hooks_class
    {
        function job_failure_retry_method($bean, $event, $arguments)
        {
            //logic
        }
    }

?>