PDA

View Full Version : Cron every 1 minute


Jhonnyf
12-26-2010, 08:44 PM
Hello, I create a cron job and it should be execute every 1 minute (ok, I know that it's not good idea, but my client say every 1 minute)

Reading the Help, I set this with "*", but I see that no execute every 1 minute (I press Ctrl+F5 every 30 second to launch the cron job)

maybe I not setting properly, or maybe I need test this in a real forum (I'm using testing forum with me as user)

Thank You

BirdOPrey5
12-26-2010, 09:06 PM
Scheduled Tasks are not "real" cron jobs. scheduled talks will only run when there is activity on the forum, specifically when the footer is loaded. If you're the only one on the test server and you don't do anything for 10 minutes, the tasks won't run at all... they only can run in response to user activity.

If you need something to run all the time regardless of user activity then you need to setup a real cron job, usually from your cpanel if you have one.

Jhonnyf
12-26-2010, 09:24 PM
Scheduled Tasks are not "real" cron jobs. scheduled talks will only run when there is activity on the forum, specifically when the footer is loaded. If you're the only one on the test server and you don't do anything for 10 minutes, the tasks won't run at all... they only can run in response to user activity.

If you need something to run all the time regardless of user activity then you need to setup a real cron job, usually from your cpanel if you have one.

Yes, I knew it was "unreal cron" and only work with users activity , for that reason I used CTRL+F5 every 30 seconds

The forum have a lot of users, for have something exactly I going to use cron jobs in cPanel

Thank You for you time

Lynne
12-26-2010, 09:42 PM
How do you know it's not running? Are you logging it? Are you looking in the page source everytime you refresh to see if a new job is being set to run - cron.php?rand=xxxxxxx - is xxxxx always different?

Jhonnyf
12-26-2010, 10:10 PM
How do you know it's not running? Are you logging it? Are you looking in the page source everytime you refresh to see if a new job is being set to run - cron.php?rand=xxxxxxx - is xxxxx always different?
maybe this is working, but just in admincp-> cron jobs

I see:

(current time 6:20 in footer)
Next Time to Execute the CRON: 6:21

REFREST (F5, Ctrl+F5 in AdminCP)
(current time: 6:21)
Next Time: 6.22 (ok, Do the Cron)

REFREST
(current time: 6:23)
Next Time: 6.22 (Execute?)

REFREST
(current time: 6:24)
Next Time: 6.22 (Execute?)

Maybe it's working... and maybe in AdminCp need time to update, but the Addons need execute every 1 minute exactly (Sell and Buy shares,Stock exchange)

I need to know if my setting it's correct :D

Thank You

kh99
12-26-2010, 10:31 PM
This is just a guess, but I'm thinking maybe refreshing an admincp page won't run the cron jobs - maybe try refreshing a forum page in a different browser window.

Jhonnyf
12-26-2010, 10:33 PM
This is just a guess, but I'm thinking maybe refreshing an admincp page won't run the cron jobs - maybe try refreshing a forum page in a different browser window.
yes, I refresh the index and browing into the forum, after that i see Admincp

kh99
12-26-2010, 10:36 PM
Oh...sorry, I see now that that's what you meant.

Lynne
12-26-2010, 11:36 PM
If the time is changing, then it is running. But, you could also use the options I posted to find out.