Jump to content

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?

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.

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.

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?

http://www.google.com/search?hl=en&q=free+cron+jobs&btnG=Google+Search

 

You can get free hosting to allow cron jobs. Which you should be able to make them open up a link on your current webserver which runs the script.

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.