Scheduling Posts
Publish posts automatically at a future date and time.
TL;DR
- When creating or editing a post, set Status to Scheduled.
- Set the Published At field to the desired future date and time.
- Save the post.
- Ensure the task runner is active: set up a cron job running
php spark cron minuteevery minute, or enable pageload mode in Admin → Settings → General.
Details
How Scheduled Publishing Works
When a post's status is Scheduled and its published_at timestamp is in the future, the post is hidden from public view. A background task — the posts:publish Spark command — runs periodically and checks for any scheduled posts whose published_at has passed. When found, it flips the post status from Scheduled to Published, making it visible on the site.
If share_on_publish is enabled on the post and social sharing is configured, the social sharing trigger fires at the moment the post is published by the scheduler, not at the time you saved it.
Setting Up the Cron Job
For reliable, minute-accurate scheduling, add a system cron job that runs the Spark task runner every minute:
* * * * * /usr/bin/php /var/www/mysite/spark cron minute >> /dev/null 2>&1
Replace /var/www/mysite/spark with the absolute path to your Pubvana installation's spark file. The >> /dev/null 2>&1 part suppresses output so you don't receive cron emails for every run.
To edit your crontab, run:
crontab -e
Pageload Mode (Alternative to Cron)
If you cannot set up a system cron job (e.g., on shared hosting), you can enable Pageload Mode in Admin → Settings → General → Task Runner. In this mode, Pubvana checks for due scheduled posts on every page load. This is less precise — a post scheduled for 09:00 might not publish until the first visitor after 09:00 — but it works without server-level cron access.
Schedule Calendar View
Admin → Schedule shows a FullCalendar monthly/weekly view of all scheduled posts. Each post appears on the day it is set to publish. Click a post in the calendar to jump directly to its edit form.
Backdating Posts
Setting Published At to a past date and Status to Published creates a backdated post. The post appears in the blog archive sorted by its published_at date, so it will slot into the chronological timeline at the correct position.