Skip to main content
Claim your .com from $2.99 — free WHOIS privacy included

Learning Hub · Intermediate · 15 minutes

How to Set Up a Cron Job

Schedule scripts to run themselves reliably — a practical, no-jargon walkthrough with the classic mistake flagged before you make it.

The short answer

Goal: schedule scripts to run themselves reliably. Time needed: 15 minutes. Difficulty: intermediate.

The walkthrough below covers each step, the mistake most people make, and the shortcut worth knowing. On HostingAlly plans, several of the steps are handled for you — we note where.

Intermediate

Difficulty

15 minutes

Time needed

5

Steps

24/7

Help if you're stuck

This guide assumes no prior expertise — just a hosting account, a browser, and 15 minutes of attention. Every instruction works on our platform exactly as written, and translates to any standard cPanel host.

Rule of the road: read the gotcha section before you begin, not after — it's harvested from the support tickets of people who didn't.

The shape of the job

The whole job breaks into clear stages: define the command precisely, pick the schedule honestly, capture output while proving it, silence it once stable and document what each job does.

None of the stages requires code or a terminal unless the guide explicitly says so — and where it does, the exact commands are given. The full step-by-step sits below; the surrounding sections cover the context that makes it stick.

The classic gotcha

Relative paths in cron commands — the script that runs perfectly from your SSH session fails silently in cron's bare environment; absolute paths for binaries and files are the immunisation.

It's worth internalising because it's not a rare edge case — it's the single most common way this task generates a support ticket. Knowing it in advance converts the whole job from risky to routine.

From the support desk: the shortcut

For WordPress, one cron hitting wp-cron.php every five minutes replaces visitor-triggered scheduling — the single most common and most valuable cron job on shared hosting.

Small habits like this are the real difference between people who find hosting easy and people who find it stressful — the tools are identical; the workflow isn't.

What's automated here

We've automated the steps that don't deserve your time: certificates issue and renew themselves, the installer handles application setup, daily backups cover the what-if, and per-site settings live in a panel instead of config files. The guide above covers what's left — the part that's actually about your site.

Stuck mid-task at an odd hour? That's what 24/7 human support is for — describe where you are in this guide and we'll take it from there.

Person managing a hosting account through the cPanel dashboard

Guides are easier on a good platform

Every walkthrough in our Learning Hub is tested on the platform we actually run — cPanel, LiteSpeed, NVMe, one-click installs — so instructions match your screen instead of gesturing at it.

Annual plans include your first year of domain registration on us.

  • Step-by-step, tested as written
  • The gotcha flagged before you hit it
  • Automation covers the boring steps
  • 24/7 support if you get stuck

Why HostingAlly

What you get with every plan

No jargon tax

Terms are explained in place or linked to the glossary — nothing assumes you already know.

Help on standby

Stuck at step three at midnight? Support answers around the clock, mid-guide included.

Automation where it belongs

SSL, backups and installs run themselves here — the guide covers only what's genuinely yours to do.

Written from real tickets

Our guides come from the support desk — the gotchas are the ones people actually hit.

The undo is always named

Where a step could bite, the guide says so and gives the reversal.

Works as written

Every step tested on our own platform — no 'your host may vary' hand-waving.

Getting Started

How to get going

  1. 1

    Define the command precisely

    Full paths always — the PHP binary and the script's absolute path — because cron's environment is bare and 'works in SSH' doesn't guarantee 'works in cron'.

  2. 2

    Pick the schedule honestly

    cPanel's presets cover common cadences; the five-field syntax covers everything else — schedule for the task's real needs, not superstition.

  3. 3

    Capture output while proving it

    Append output redirection to a log file during setup — the log is how you distinguish 'ran and failed' from 'never ran', cron's two very different failure modes.

  4. 4

    Silence it once stable

    After verified runs, redirect to /dev/null or keep a rotating log — unmanaged cron email to the account address becomes its own noise problem.

  5. 5

    Document what each job does

    A comment line or a notes file mapping jobs to purposes — inherited crontabs full of mystery commands are how necessary jobs get deleted.

Included

What's covered on our plans

  • Daily automatic backups with self-service restores
  • Per-site PHP version selection
  • Email accounts on your own domain
  • cPanel — the industry-standard control panel
  • Free domain for the first year on annual plans
  • NVMe SSD storage as standard
  • Free SSL certificate on every plan, renewed automatically
  • DDoS protection at the network level
  • LiteSpeed server-level caching
  • 24/7 support from real people

FAQ

Your questions, answered

How often can cron jobs run?

Every minute at the syntax level — shared-hosting etiquette and plan limits suggest not running heavy tasks that often. Match frequency to need: most maintenance jobs are hourly-to-daily creatures.

My cron job isn't running — how do I debug?

Add output logging and check it: nothing logged means schedule/command-line issues (paths, syntax); errors logged mean the script itself. The panel shows the exact command — paste it into SSH to test interactively.

Are backups included, and can I restore them myself?

Daily automatic backups are standard, restorable from the panel in minutes — files, databases or both, at 3am without a ticket if that's when you need it. For extra cover, you're welcome to run your own offsite copies alongside.

Can I host more than one website on a plan?

On the Pro tier and above, yes — multiple sites with their own domains, email and SSL under one account. If the extra sites belong to clients rather than you, reseller hosting gives each one proper isolation instead.

What does your 24/7 support actually cover?

Real people at every hour, and a scope that includes the practical questions — email setup, DNS, WordPress issues, restores — not just 'the server is up, ticket closed'. Pre-sales questions are welcome too; ask us something difficult and judge the reply.

Where is your company based?

HostingAlly is a trading name of Bohzo Ltd, a company registered in England and Wales — a real, verifiable business with published terms under English law, which is worth checking about any host before you hand them your domain.

Will you move my existing website for free?

Yes — open a ticket with your current host's access details and we handle the whole move: files, databases, email and configuration, verified by you before DNS switches. The old site keeps serving until the new copy takes over, so visitors never see a gap.

Launch it properly this time.

Every plan includes the essentials others sell as extras — and support that actually answers.

See Hosting Plans