Skip to main content
.com domains from $2.99 — WHOIS privacy at no extra charge

How-to · Intermediate · 15 minutes

How to Set Up a Cron Job

Put a script on a schedule and trust it to run without you watching — a practical, jargon-free walkthrough with the classic mistake flagged before you make it.

Straight answer first

The job: put a script on a schedule and trust it to run without you watching. Time to allow: 15 minutes. Skill needed: intermediate.

The walkthrough below covers every step, the mistake most people make, and the shortcut worth keeping. On Hosting Seller plans several of these steps are already done for you, and we say where.

Written by the Hosting Seller staff · Checked 1 August 2026

Intermediate

Difficulty level

15 minutes

Time to allow

5

Stages

24/7

Help at any hour

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

Rule of the road: read the snag section before you begin rather than after. It is harvested from the tickets of people who did it the other way round.

The shape of the work

The job breaks into a few clear stages: write the command with full paths, set an honest schedule, log the output while you are testing, quieten it once it is proven and leave a note saying what it is for.

No stage needs code or a terminal unless the guide says so outright, and where it does, the exact commands are printed. The full step-by-step sits below; the sections around it give the context that makes it stick.

The classic snag

Relative paths in the command. The script that runs perfectly from your SSH session does nothing whatsoever under cron, and it fails without a sound. Absolute paths for both the binary and the file are the cure.

It is worth learning because it is not some rare edge case — it is the single most common reason this task turns into a support ticket. Knowing it up front turns the whole job from risky into routine.

The shortcut, straight from the support desk

On WordPress, one cron calling wp-cron.php every five minutes replaces the visitor-triggered scheduler. It is the most common cron job on shared hosting, and comfortably the most useful.

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 working method is not.

What runs by itself here

We have automated the steps that do not deserve your time: certificates issue and reissue themselves, the installer handles application setup, the daily backup covers the what-if, and per-site settings live in a panel instead of a config file. The guide above covers what remains — the part that is actually about your site.

Stuck halfway through at an odd hour? That is exactly what round-the-clock human support is for — tell us where you are in this guide and we will pick it up from there.

Someone running a hosting account from the cPanel dashboard

A good platform makes every guide shorter

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

Order an annual plan and the first year of your domain registration is on the house.

  • Step by step, tested exactly as printed
  • The snag flagged before you reach it
  • The dull steps are already automated
  • People on hand at any hour if you stall

Why Hosting Seller

On every plan, as standard

5 steps, no filler

Each stage is a few minutes of steady clicking, with the fiddly parts marked as fiddly.

The snag, named early

The classic mistake for this exact job is flagged before step one, so 15 minutes stays 15 minutes.

Scoped honestly

Put a script on a schedule and trust it to run without you watching is a intermediate-level task — this guide budgets 15 minutes and says which steps the platform absorbs.

Written from real tickets

Our guides come off the support desk, so the snags flagged here are the ones people genuinely hit.

Automation where it belongs

SSL, backups and installs run themselves here, so the guide covers only what is genuinely yours to do.

Works exactly as written

Every step tested on the platform we run — no 'your host may differ' hand-waving anywhere.

First Steps

From choosing to live

  1. 1

    Write the command with full paths

    Give the absolute path to the PHP binary and to the script itself. Cron runs with a bare environment, so 'it works in SSH' guarantees nothing at all about how it behaves here.

  2. 2

    Set an honest schedule

    cPanel's presets cover the common intervals and the five-field syntax covers everything else. Choose the frequency the job genuinely needs, not the one that feels safest.

  3. 3

    Log the output while you are testing

    Redirect the output to a file during setup. That log is the only thing that separates 'ran and failed' from 'never ran' — cron's two completely different failure modes.

  4. 4

    Quieten it once it is proven

    After a few clean runs, send output to /dev/null or keep a rotating log. Unmanaged cron mail piles into the account mailbox and becomes a nuisance in its own right.

  5. 5

    Leave a note saying what it is for

    A comment line, or a file listing each job against its purpose. An inherited crontab full of unexplained commands is how a necessary job gets deleted by somebody tidying up.

In the Box

Packed with every plan

  • One-click installs for WordPress and 400+ other applications
  • Webmail in the browser plus IMAP, POP and SMTP for your own client
  • A domain free for year one when you order annually
  • Spam and virus filtering fitted to every mailbox
  • PHP versions picked per site from the panel
  • A backup taken daily, with restores you run yourself
  • Site migration done for you by our staff, at no charge
  • WebP image optimisation built in and costing nothing
  • LiteSpeed caching running at the server, not bolted on by plugin
  • Mailboxes that carry your own domain name

Across the Counter

The questions we get asked most

What is the shortest interval I can use?

Every minute, as far as the syntax is concerned. Plan limits and simple good manners on a shared server argue against running heavy work that often. Match the interval to the task: most maintenance jobs are hourly or daily creatures.

The job never seems to run — how do I find out why?

Turn output logging on and read it. An empty log points at the schedule or the command line, meaning paths and syntax. Errors in the log point at the script itself. The panel shows the exact command; paste it into SSH and watch what happens.

Does hosting come with mailboxes?

It does — mailboxes on your own domain ship with every hosting plan, with webmail, IMAP, POP and SMTP access and spam filtering fitted as standard. There is also standalone email hosting for domains whose website lives somewhere else entirely.

Where do the servers actually sit?

Our hosting runs from European datacentres with London at the centre, behind server-level caching that keeps cached pages quick for visitors anywhere. For most sites the build of the platform — NVMe disks, LiteSpeed, sensible numbers of accounts per machine — decides the speed far more than the postcode does.

What if the site outgrows the plan I bought?

You move up in place. Plan changes are made from the client area with no migration and no downtime, and the range runs from small shared accounts through VPS to whole dedicated servers. Growing becomes a line change on your account rather than a hunt for a new host.

What uptime do you commit to, and who is watching?

We commit to 99.9% uptime and watch it continuously. That figure is an operational target rather than a poster line, and the alerting behind it usually has an engineer on a problem before the first customer notices anything is wrong.

Is the SSL certificate genuinely free?

On every plan, with nothing held back. The certificate is issued the moment your domain points here and reissues itself well before expiry. The encryption is the same as a paid DV certificate — paid tiers exist only for wildcard coverage or organisation validation, which most sites never need.

Packing up and moving host? Take our checklist.

A plain running order for a move nobody notices: what to copy first, how to carry email across without dropping a single message, when to point DNS, and the two slips behind nearly every hour of downtime we get called about.

One email carrying the checklist, then the odd note on running a site well. Step off the list whenever you like — our privacy policy spells out the rest.

Your site is worth better hosting.

Every plan carries the essentials other hosts ring up as extras — and support that actually replies.

See the plans