Scheduled Posts
Auto-publish posts at a future date and time.
TL;DR
Edit a post → set Status to Scheduled → pick a future date and time in Published At. Requires php spark cron minute running via cron every minute, or Page Load mode. View the full schedule at Admin → Schedule.
Details
How Scheduling Works
When a post's status is set to scheduled, the PublishScheduledPosts Spark command (AppCommandsPublishScheduledPosts) handles publishing it at the right moment. The command runs every minute via the cron system (registered as the posts-publish task).
Each time it runs, it queries:
SELECT * FROM posts WHERE status = 'scheduled' AND published_at <= NOW()
For each matched post, it:
- Sets
statustopublished. - Records an activity log entry (
post.published). - Calls
SocialSharingService::share()ifshare_on_publishis enabled on that post.
Setting a Scheduled Post
- Go to Admin → Posts → New Post (or edit an existing post).
- Set Status to Scheduled.
- Set Published At to any future date and time using the datetime picker.
- Save the post.
The post will remain invisible to the public until its published_at time is reached and the cron job has run.
Schedule Calendar
Admin → Schedule shows a full calendar view (FullCalendar) of all scheduled posts. Each scheduled post appears as a calendar event on its target publication date. Click an event to jump directly to the post editor. This gives a visual overview of your content pipeline.
Timing Accuracy
- With cron: The
cron minutecommand fires every minute, so scheduled posts go live within 60 seconds of their target time. - With Page Load mode: Posts are published when the next web request arrives after the target time. On low-traffic sites this could be minutes or hours late. For time-sensitive content, use a cron job.
Troubleshooting
- Post not publishing? Verify the crontab is set up and running. Check that
published_atis in the past. Confirmstatusisscheduled(notdraft). - Timezone issues? Pubvana stores all timestamps in UTC. Set your server and database to UTC to avoid surprises with scheduled times.