PDA

View Full Version : script cron


Bombowiec89
08-31-2008, 08:07 PM
Hi, can someone help me, now he tries a few days, but does not go.

It needs a script to perform my command for vbulletin cron.

I tried different ways db_query_write etc, but still was bad.


It needs a cron to me in such a command, practised

UPDATE `MYDATABASENAME`.`PREFIX_setting` SET `value` = '50' WHERE CONVERT( `vBsetting`.`varname` USING utf8 ) = 'zbomb' LIMIT 1 ;

I can give someone ready code.

Sory for my bad english.:rolleyes:

Dismounted
09-01-2008, 06:42 AM
Please post your whole script. Also, is this cron a vBulletin Scheduled Task, or a Unix cronjob?

Bombowiec89
09-01-2008, 07:48 PM
vBulletin Scheduled task.

Marco van Herwaarden
09-02-2008, 06:14 AM
And the contents of the script?

Lynne
09-02-2008, 02:42 PM
If it is a scheduled task, you need more in your script than just that query. Something more like:

<?php

/*================================================= =====================*\
|| ################################################## ################## ||
|| # Cron Job to do whatever ||
|| # Last Modified: Whenever ||
|| ################################################## ################## ||
\*================================================ ======================*/

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

if (!is_object($vbulletin->db))
{
exit;
}

All your actions here... like
$query="UPDATE whatever";
$vbulletin->db->query_write($query);

log_cron_action('Update whatever', $nextitem);

?>