Settinggroup loaded with the product file. From a manual run of the cron job, the values of the different settings are available. But on its own as a scheduled job, those values do not seem to be available. Is there any special "include" instruction that must be specified at the very beginning of a cron file?
To have the cron file working as a standalone scheduled job, I have replaced (in the cron file) for example all occurrences of:
$cron_mysetting_varname = $vbulletin->options['mysetting_varname']
(resp. $cron_myphrase = $vbphrase['myphrase'])
with:
$get_setting = $vbulletin->db->query_read("SELECT * FROM `". TABLE_PREFIX ."setting` WHERE `varname` = 'mysetting_varname'");
$fetchsetting = $vbulletin->db->fetch_array($get_setting);
$cron_mysetting_varname = $fetchsetting['value'];
(resp.
$get_phrase = $vbulletin->db->query_read("SELECT * FROM `". TABLE_PREFIX ."phrase` WHERE `varname` = 'myphrase'");
$fetchphrase = $vbulletin->db->fetch_array($get_phrase);
$cron_myphrase = $fetchphrase['text'];
)
|