Can't see my Scheduled Task

Hi. My first attempt at scheduling a custom task. I’m following the instructions found at https://docs.suitecrm.com/developer/scheduled-tasks/ , I created the following folders/files.
Then ran “Quick Repair & Rebuild.” But nothing new is showing up in the Create Scheduler “Job” Dropdown. It still just says, “URL.”

Permissions are all 775. Nothing in suitecrm.log. Apache error log does give a Notice - “PHP Notice: Undefined index: LBL_URL in .[my_server_path]/modules/Schedulers/Scheduler.php”

///////

./custom/Extension/modules/Schedulers/Ext/Language/en_us.abc_custom_job.php


<?php
$mod_strings['LBL_ABC_CUSTOM_JOB'] = 'ABC Custom Job';

/custom/Extension/modules/Schedulers/Ext/ScheduledTasks/abc_custom_job.php


<?php

    $job_strings[] = 'abc_custom_job';
    function abc_custom_job()
    {
        //logic here
        //return true for completed
        $GLOBALS['log']->fatal("Comes inside my function now!");
	return true;
    }

Do verify, After quick repair & rebuild your scheduler’s entry are inside the file and merged with other schedulers?

custom/modules/Schedulers/Ext/ScheduledTasks/scheduledtasks.ext.php

and same for the Language file.

Make sure you are checking a correct language file.

Looks like those files are there. Is this what they’re supposed to look like? There doesn’t appear to be any merging, but would there be with my first attempt? Should it merge with the defaults? Sorry, I have know idea how this comes together. The “Job” dropdown still just has the “URL” option.
////

custom/modules/Schedulers/Ext/ScheduledTasks/scheduledtasks.ext.php

<?php 
 //WARNING: The contents of this file are auto-generated



    $job_strings[] = 'abc_custom_job';
    function abc_custom_job()
    {
        //logic here
        //return true for completed
        $GLOBALS['log']->fatal("Comes inside my function now!");
	return true;
    }

custom/modules/Schedulers/Ext/Language/en_us.lang.ext.php

<?php 
 //WARNING: The contents of this file are auto-generated


$mod_strings['LBL_ABC_CUSTOM_JOB'] = 'ABC Custom Job';

Hi. If you’re not sure of the solution, would you mind answering the questions in my previous response. So, at least I know I’m on the right track?

Hello,

It could be a bug in your version. I am not sure which version you are using.
Here is the registered bug https://github.com/salesagility/SuiteCRM/issues/6364
But that is fixed in the newer version.
You can verify your files with the hotfix from here https://github.com/salesagility/SuiteCRM/commit/9c2410c6486ab0e6b9e62813e4622a13d992c1b1#diff-9e0065b4c40cb65b4d6e964dad7396b5

1 Like

This works for me.