The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Scheduled Tasks - Logging
I've created my own Scheduled Task coded in MySQLi. Although, I'm stumped as to how to make this Scheduled Task Log its actions.
Core Code: PHP Code:
Warning: implode() [function.implode]: Invalid arguments passed in [path]/includes/cron/mycode.php on line 19 Can anyone help me so I can properly Log these actions? Thanks, Mark |
#2
|
|||
|
|||
The second implode() parameter needs to be an array. If you want to log the entire $logging array, probably you just want to pass it $logging (without the [$id]).
|
#3
|
||||
|
||||
Without the ['id'] leads to the whole row being logged. Is there any way to just make it log the ID?
|
#4
|
|||
|
|||
I think you can either provide a string to log, like
Code:
log_cron_action("Id is " . $logging['id'], $nextitem); or else you can use a phrase (which has to be named task_varname_log, where varname is the actual varname of your task), and you can pass either one parameter to the phrase, or an array of parameters. So you could call it like this: Code:
log_cron_action('', $logging['id'], $nextitem); and then make a phrase something like "Id is {1}". (FYI I got this by looking at the code, but I haven't actually tried it). |
#5
|
||||
|
||||
Works, thanks for your help!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|