Skip to content
NewHost
Menu

Automation & Scheduled Tasks

Scheduled Tasks, Git Deploys & Webhooks

Automate the routine work. Call a URL or deploy an app on a cron schedule or once at a set time, see every run's result, deploy on every push, and have NewHost notify your own systems when something happens.

Features

Cron or one-off tasks

Five-field cron schedules or a single run at a set time, in South African time (Africa/Johannesburg).

Call any public URL

GET or POST to an https address, with a 30-second timeout; the status code and the start of the response are kept.

Deploy on a schedule

Redeploy one of your NewHost apps nightly, weekly or whenever you need it.

Run history

Every run's time, result, duration and output, kept as long as your plan says.

Push to deploy

Connect GitHub once and every push deploys, with deployment statuses on your commits; GitLab via a signed webhook per app.

Signed webhooks

Signed events for app, deployment, domain, database, payment and subscription changes, retried with back-off when your endpoint fails.

What people automate

Run your app's cron endpoint

Call https://your-app.co.za/api/cron every 15 minutes to send reminders, sync stock or clear caches.

Nightly rebuilds

Deploy a static or ISR site at 02:00 every night so it picks up new content from your CMS.

Reports and exports

POST to an endpoint on the 1st of the month to e-mail last month's report.

One-off launches

Deploy a release or call a webhook once, at the exact time of a launch or sale.

How it works

  1. 1

    Create a task

    Choose Call a URL or Deploy app, then a schedule or a one-off time.

  2. 2

    It runs on time

    NewHost runs it on schedule and records the result of every run.

  3. 3

    Check the history

    See each run's status, duration and output; run it now, pause or delete it any time.

Frequently asked questions

How often can a scheduled task run?

It depends on your allowance: every 5 minutes at most with a NewHost app plan, and as often as each automation plan says (down to every minute). One-off tasks run once at the time you choose.

What can a task do?

Call a public https URL with GET or POST (for example your app's cron endpoint), or deploy one of your NewHost apps. Automation plans list the task types they include.

Do I need an automation plan?

App plans include up to 50 tasks, every 5 minutes at most, with unlimited runs. An automation plan adds more frequent runs and longer run history, and gives scheduled tasks to accounts without an app plan.

What counts as a run?

Each time a task runs, successful or failed. Plans with a monthly number of runs count them per calendar month in South African time; when they are used up, further runs are skipped until the next month or an upgrade.

How long is the run history kept?

As long as your plan says: 7 days with an app plan, and each automation plan's number of days.

What happens if a URL is slow or fails?

A call waits up to 30 seconds. The run is recorded as failed with the HTTP status or what went wrong, and the next run happens on schedule.

Which time zone are schedules in?

South African time (Africa/Johannesburg): "0 2 * * *" runs at 02:00 in South Africa.

How do I verify webhooks from NewHost?

Each delivery includes an X-NewHost-Signature header: an HMAC-SHA256 of the timestamp and body using your endpoint's secret.

Related guides

All developers guides

Related

Put your tasks on a schedule

Sign up and create tasks that call your URLs or deploy your apps on a timetable, with the result of every run recorded.