• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] random cron time period command

Started by dtiberio,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dtiberioTopic starter

you can use this command from MySQL to set random cron periods for every cron. this means that they will run randomly throughout the day, instead of getting 1 large pull per day or every few hours.

I have 700 crons right now, set to run 2 or 3 times each per day.

this will set the cron period as a random number between 30,000 and 40,000. you can change the minimum cron period by changing the value 30,000 below, and change the maximum it can go above that by changing the value that is 10,000 below.

update vibe_crons set cron_period = round(rand() * 10000) + 30000;
  •  

magsvx

Hello! Could you tell more how to do this. :)
  •  

megaman79

Quote from: dtiberio on
you can use this command from MySQL to set random cron periods for every cron. this means that they will run randomly throughout the day, instead of getting 1 large pull per day or every few hours.

I have 700 crons right now, set to run 2 or 3 times each per day.

this will set the cron period as a random number between 30,000 and 40,000. you can change the minimum cron period by changing the value 30,000 below, and change the maximum it can go above that by changing the value that is 10,000 below.

update vibe_crons set cron_period = round(rand() * 10000) + 30000;

Hello Dtiberio,

Is this a MySQL Query Command to run it, and it will update all the Crons?
"Very Happy with PHPVibe"
  •  

Similar topics (7)