Schedules
Run trusted PHP scripts on a schedule through WordPress cron, with run history, logs, and approval before anything runs.
OctoPress → Schedules lets you run PHP scripts once, hourly, daily or weekly. WordPress cron starts each run in a separate command-line PHP process with WordPress loaded.
Scheduled code is trusted, administrator-approved PHP. Process isolation protects your web requests, but it is not a security sandbox: the code keeps the permissions of the PHP user. Only schedule code you understand.
Before you start#
- Pro with an active licence.
- A working command-line PHP. See Runtime. If it is missing, the page shows "Scheduled PHP execution is unavailable." You can still manage schedules, but they will not run.
- WordPress cron must fire. On low-traffic sites use a real server cron job for
wp-cron.php.
The schedule list#
The list has filters (All, Active, Paused, Failed, Completed, Deleted) and these columns: Title, Status, Recurrence, Next run, Last run, Failures, Author and Actions (Edit, Run now, Pause/Resume, Delete).
Create a schedule#
You can ask Octo ("Help me schedule a PHP script that runs weekly to …") or click Add schedule. Octo shows the code, recurrence and timing in an approval window before it creates anything.
Fields in the form:
- Title and Purpose (what the schedule does and why).
- Recurrence: Once, Hourly, Daily or Weekly.
- Starts at and Timezone. Named timezones such as
Asia/Riyadhare preferred; fixed offsets such as+00:00do not follow daylight saving time. - Timeout (seconds): defaults to 60, at most 1,800 and never longer than the recurrence interval.
- PHP code: the body only, without
<?php.
Click Create paused schedule.
Test before you activate#
New schedules always start paused. The success message says: "Schedule created paused. Run it manually and verify it before activation."
- Click Run now and open the schedule's Recent runs.
- Click View details to read the Script output and Runtime diagnostics, and download the full log if needed.
- When a manual run succeeds, click Resume to activate the schedule.
What happens on failure#
- A schedule that fails three times in a row is set to Failed and stops running. A once schedule fails after its first failed run.
- Fix the code, save, then Resume.
- A once schedule that succeeds becomes Completed.
- Delete keeps the run history and logs. Queued runs are cancelled, and a run already in progress may finish.
Good to know#
- Octo's schedule tools always ask for approval. Approve all does not skip them.
- While the Schedules page is open it shows a notice when a run finishes.
- A schedule whose Next run date is in the past means cron is not running. Check your host's cron setup.