The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Running daily MYSQL queries
This is probably a very, very basic question. I assume the Cron tool is involved in some way, but let's assume I'm a dummy and know nothing about crons and PHP...
Assuming I know exactly what query it is I want to run, and run it manually fairly often, how do I schedule it to run automatically on a daily basis and save me that work? |
#2
|
|||
|
|||
You can create a plugin using hook location "cron_script_cleanup_daily", and write code to do your query. You should use one of the vbulletin db functions like $vbulletin->db->query_read() or $vbulletin->db->query_write() (query_write() I'd assume, since you probably want to change the database as opposed to reading data).
|
#3
|
||||
|
||||
I'm always curious, what queries do you want to run daily?
|
#4
|
|||
|
|||
Quote:
Just something that assigns thread prefixes based on the presence of certain keywords in thread titles. I need to apply it to my RSS feeds forum. It's easy enough to execute the query (well, a bunch of queries) manually, but I wanted to save myself the daily task. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|