vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   cron using datamanager issues (https://vborg.vbsupport.ru/showthread.php?t=168709)

lyndonb 01-25-2008 02:39 PM

cron using datamanager issues
 
Hi all!

I'm new to Vbulletin, but have programming experience. I'm trying to create a cron to automatically open and close forums.

I have the script fully setup, but it fails on the cron (works when I open the script in a browser).

I've hunted and line in init.php 414 ---->

$vbulletin->session =& new vB_Session($vbulletin, $sessionhash, $vbulletin->GPC[COOKIE_PREFIX . 'userid'], $vbulletin->GPC[COOKIE_PREFIX . 'password'] , $styleid, $languageid);

is the show stopper. Its creating a session, which obviously isn't happening when the script runs from the command line.

Does anyone have any suggestions here?

Thanks in advance

Lyndon

MarkPW 01-25-2008 11:53 PM

Is there a reason why you're creating a session for your cron script?

I define the following for my crons:

Code:

define('SKIP_SESSIONCREATE', 1);
define('NOCOOKIES', 1);
define('DIE_QUIETLY', 1);


Marco van Herwaarden 01-26-2008 07:19 AM

Are you setting up an Operating System cronjob, or a vBulletin Scheduled Task?

lyndonb 01-26-2008 02:39 PM

I haven't defined:

define('NOCOOKIES', 1);
define('DIE_QUIETLY', 1);

It's using the systems crotab.

I'm not creating a session on purpose, I'm trying to open / close the forums using VBulletin's system function. I didn't know about the NOCOOKIES macro, which I think, judging from the name, will solve my issue.

I'll try defining the macro's on monday.

Thanks for the help and I'll post with the result.

L

lyndonb 01-28-2008 11:58 AM

This worked thanks.

Lyndon


All times are GMT. The time now is 07:40 PM.

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.01026 seconds
  • Memory Usage 1,711KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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