The top resource for frugal webmasters

August 26, 2020

The cron utility plays an important role in automating tasks in many situations. You'd be forgiven for thinking that without access to this utility your only option is to run the task manually, luckily it's possible to run some of these tasks without using cron at all. How? By repurposing your monitoring software!

Point-of-view photo of a man looking at his watch while working

This website has partnerships with some of the companies linked to in this article. When you click those links, the operator of this site may recieve a commission. These partnerships support the site so we can keep bringing you the best answers to your questions.

In the event that you are using a cheap shared hosting plan, or even free hosting, you may run into limitations on your cron jobs. If so, and the script is public (chmod 0644, often the case with WordPress plugins requiring tasks be run via cron), it will be possible for you to run the script per your schedule by using any number of free website monitoring services (frequently called "uptime monitors").

If you're not already using a website monitoring service, a great choice is StatusCake. They offer a massive set of features (more than any other provider I've tried including server monitoring), and have a great UI. The free tier is more than adequate for small projects.

Running a script using StatusCake

Although the instructions below are for StatusCake, the underlying concept is going to be the same regardless of what uptime monitoring service you use. Once you're all registered or logged in, head over to the dashboard and select "New Uptime Test".

Statuscake administration panel, new test screen

Select HTTP, enter a check rate (unfortunately you're limited to 5, 15, 30 minutes, 1 hour or 24 hour increments, but upgrading is pretty cheap and link to plan comparisons here well worth it) and the full URL to your script. Name your test, select your contact groups and proceed to the bottom of the page.

SatatusCake administration panel, additional options

You may want to increase the crawl timeout from the default 15 seconds to something like 40 or 50 seconds, especially if you're running an RSS syndicator with many feeds or other resource intensive task. Finally, you can save your test and observe the results. So long as the script is accessible your task should run. It's important to set up alerts so you can keep things running smoothly!

This is a simple, free workaround I figured out years ago for running scripts without access to the crontab... back in the bad old days!

Sherman Caine

Sherman is a professional full-stack web developer living in Toronto, Canada, who has been working on websites in one form or another for over 15 years.