vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Scheduled it Task Help (https://vborg.vbsupport.ru/showthread.php?t=290525)

TheSupportForum 11-12-2012 01:18 AM

Scheduled it Task Help
 
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


PHP Code:


// ######################## 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($logname0, -4) . '-' date("d-M-Y"time()) . ".txt");
echo 
"C'est fini. You can view your logs
\n
"
;

log_cron_action(); 


nhawk 11-15-2012 07:59 PM

It's running, you're probably not seeing the warning about the log_cron_action missing parameters.

Change this...
Code:

log_cron_action();
To this..
Code:

log_cron_action('',$nextitem, 1);
Also, be sure the file you're trying to rename is properly closed and not being written to before renaming it.


All times are GMT. The time now is 08:51 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01679 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete