Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Is It Possible To Make Php Scripts Executed Without A Cron?
mingkus
post Aug 21 2008, 04:45 AM
Post #1


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 3
Joined: 21-August 08
Member No.: 32,172



Title says it all really.

Just wondering if it's possible in an way? If so could anyone tell me?
Go to the top of the page
 
+Quote Post
vujsa
post Aug 21 2008, 05:00 AM
Post #2


Absolute Newbie
Group Icon

Group: Admin
Posts: 888
Joined: 20-February 05
From: Indianapolis, Indiana, USA (Midwest)
Member No.: 2,714
myCENTs:35.43



Well, I usually use a trigger to run a script. I usually combine this with a timer to ensure that the script is executed the proper number of times.

This is helpful for people that don't have access to cron jobs.

Basically, in every page of my website, my script would check to see how long it has been since the last time the operation had been executed and if the amount of time since the last execution was longer that the required interval, the operation is then executed then. Otherwise, it is not.

When the script is execute, the timer is reset and if more than one interval has passed, the operation is executed however many times it should to get current.

This way your web server is only working when you have visitors.

There are a few topics about this on the forums if you want more information.

vujsa
Go to the top of the page
 
+Quote Post
Quatrux
post Aug 21 2008, 07:12 AM
Post #3


the Q
Group Icon

Group: [HOSTED]
Posts: 1,094
Joined: 13-July 05
From: Lithuania, Vilnius
Member No.: 7,059
myCENTs:70.96



For vujsa suggested solution to work every time someone has to access the script or program to check it, otherwise it will be the same, but as for most of the things this is usually the same as using a cron job, because who cares if the information or that job isn't changed if noone is accessing it anyway, so if somebody has accessed your script, the timer thing will do everything and the client/user will see the updated data of your script or whatever the cron job should execute will be changed, I could think of situations this couldn't work, thats why cron jobs are usually used, but for everything there is a solution in my opinion, because everything is almost possible biggrin.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Need Advice On Good Free Blog Scripts(7)
  2. Problem With PHP Scripts Without MySQL(1)
  3. How To Use Cron Jobs To Save Two Images?(8)
  4. Where Do I Find Some Free Php Scripts For Quiz / Poll?(3)


 



- Lo-Fi Version Time is now: 22nd November 2008 - 11:53 PM