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”
<?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;
}
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.
////
<?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;
}