Life without cron - how to automate your boring web-tasks

There's more to creating the cutting edge of elite websites than flashy graphics - thankfully. To keep a website in order there is sometimes call to repeat a task at certain intervals, for instance to make a backup, create a search index, or clear temporary files. People with their own servers or a decent level of access to shared servers often use the cron command to run things every day at 4am, or the first day of every month and so on rather than having to remember to run lots of boring scripts last thing at night. This is great - unless you don't have access to such things, or have to pay extra for them.

There are a few potential ways around this, but often most convenient is a free service called webcron. This allows you to set up a cron-like service from their servers, that will open up any webpage on your server. So, write some php or whatever to perform whatever-you-need-doing on your server and set webcron to run that script automatically every so often. Voila - a reasonable impression of cron.

A couple of caveats: Firstly, whatever webcron is set to run must be available publicly so it can access it. Be sure you are not compromising your security in any way. Secondly, many shared sites have restrictions on what web scripts are actually allowed to do (also for security reasons) so it's not quite as powerful or as flexible as a real cron.


Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <del> <p>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You may use [acidfree:xx] tags to display acidfree videos or images inline.
  • Images can be added to this post.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.