TheSupportForum
11-12-2012, 01:18 AM
Hi i need some extra support on a Scheduled task
1) the scheduled task will work if you run manually
but for some reason at the scheduled time after its run it does not created the file
at all, if someone could please look over this scheduled task to see why it might be happening
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($vbulletin->db))
{
exit;
}
// ##################### DEFINE IMPORTANT CONSTANTS #######################
// ################################################## ######################
// ######################### START MAIN SCRIPT ############################
// ################################################## ######################
$logfile = $vbulletin->options['ag_path'];
$logurl = $vbulletin->options['ag_url'];
$logname = $vbulletin->options['ag_thefilename'];
echo "backup of your file
";
echo "Finished
";
$logfile = $vbulletin->options['ag_path'];
rename("$logfile/$logname", "$logfile/backup/" . substr($logname, 0, -4) . '-' . date("d-M-Y", time()) . ".txt");
echo "C'est fini. You can view your logs
\n
";
log_cron_action();
1) the scheduled task will work if you run manually
but for some reason at the scheduled time after its run it does not created the file
at all, if someone could please look over this scheduled task to see why it might be happening
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
if (!is_object($vbulletin->db))
{
exit;
}
// ##################### DEFINE IMPORTANT CONSTANTS #######################
// ################################################## ######################
// ######################### START MAIN SCRIPT ############################
// ################################################## ######################
$logfile = $vbulletin->options['ag_path'];
$logurl = $vbulletin->options['ag_url'];
$logname = $vbulletin->options['ag_thefilename'];
echo "backup of your file
";
echo "Finished
";
$logfile = $vbulletin->options['ag_path'];
rename("$logfile/$logname", "$logfile/backup/" . substr($logname, 0, -4) . '-' . date("d-M-Y", time()) . ".txt");
echo "C'est fini. You can view your logs
\n
";
log_cron_action();