Nov 25, 2009

Is It Possible To Make Php Scripts Executed Without A Cron?

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Programming > Scripting > PHP

Is It Possible To Make Php Scripts Executed Without A Cron?

mingkus
Title says it all really.

Just wondering if it's possible in an way? If so could anyone tell me?

Comment/Reply (w/o sign-up)

vujsa
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

Comment/Reply (w/o sign-up)

Quatrux
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

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : make, php, scripts, executed, cron,

  1. Where Do I Find Some Free Php Scripts For Quiz / Poll?
    (3)
  2. How To Use Cron Jobs To Save Two Images?
    (8)
    I have little knowlegde of PHP, and none/never done a cron job. How would I save two images that
    change every ten minutes on another website? Maybe add a timestamp and put them in a folder.....
  3. Problem With PHP Scripts Without MySQL
    i have problems with scripts (1)
    I've been working on my site, and the first time i tried my hand witha php guestbook script, i
    did good, it worked on my host. but although i successfully installed an "send email" php script,
    but somehow although on the site when i tired out the form, though it says email has been sent,
    i've not received any email at all!!! and i've checked the account that was to specified
    for the email to be sent , i have entered everything right. This are the steps the manual asked me
    to do, QUOTE 1) Open up config.php with a word editor such as notepad. Fill ....
  4. Looking For Upload Scripts That Support Over 150MB
    help (3)
    ive heard upload scripts have a upload limit of 2MB, is this true and does anybody have a upload
    script that supports 150mb ... plz let me know thanks bash18....
  5. Need Advice On Good Free Blog Scripts
    and good ones? (7)
    Anybody know of any free good blog scripts that are easy to install and use, that can also fit
    easily into your website layout? This is really important so if anyone knows can you please help me
    asap... thanks in advanced.....
  6. Server-friendly Php Scripts
    (5)
    Hi I'm relativly new to php... I'm interested in writing server-friendly php scripts and i
    was wandering in what cases php scripts are harmfull to server i runs on... i was thinking about
    issues like: * Which php functions are expensive from the point of view of server's
    performance and resources? * What is considered to be a long array in php context if ,say, each
    record is 100 bytes long? (100+ element ? a few thousands?) * Are there some assumptions that php
    programmer should avoid? (comes to mind this example: http://il.php.net/register_globals )....

    1. Looking for make, php, scripts, executed, cron,

See Also,

*SIMILAR VIDEOS*
Searching Video's for make, php, scripts, executed, cron,
advertisement



Is It Possible To Make Php Scripts Executed Without A Cron?

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com