vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=319172

How to automate database query?
by viper357
22 Jun 2015 13:12

Hi all

The "Execute SQL Query" option, Is it possible to automate this?

I need to execute this query once a week, every week.
UPDATE rbs_banners SET m_expired=0

Thanks.

kh99 22 Jun 2015 13:37

You could make a plugin using hook cron_script_cleanup_daily and code like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


It's not perfect. For one thing if, for example, you set it up to run on Monday and for some reason the cleanup script doesn't run (like your forum is down or something), it wouldn't run until the next week. BUt it might be good enough for your purposes.

viper357 22 Jun 2015 13:50

That seems great, thank you. :)


All times are GMT. The time now is 04:32.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.