Jump to content

carry out function every 24 hours, without cron jobs??


Dragen

Recommended Posts

Okay.. I'm trying to write a script which gets a random number every day, or 24 hours.

I'm sure that the only way of doing this is using cron jobs, but I've checked with my host and they don't allow cron jobs :-\

 

Is there any other possible way of getting a script to activate every 24 hours?

Link to comment
Share on other sites

Thanks for the reply.

I'm trying to stay away from javascript if possible as it means many people wont be able to access certain features of my site, so I really need it to be server side script, not client side.

Link to comment
Share on other sites

Javascript isn't going to help in any case. I'm afraid your only real option is cron. If your current server does not support it, either find one that does or get yourself a free shell account somewhere, from that shell account you can request scripts on your site via cron.

Link to comment
Share on other sites

You could add a snippet that runs and checks a value in the database against the date it was last edited. However this would entail an exra query on each request of the page you placed that query in - so as thorpe says a cron is really the only answer.

Link to comment
Share on other sites

Javascript isn't going to help in any case. I'm afraid your only real option is cron. If your current server does not support it, either find one that does or get yourself a free shell account somewhere, from that shell account you can request scripts on your site via cron.

How do I go about getting a shell account? what is a shell account?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.