Setting Up the Cron Job
Configure the server cron job that drives scheduled posts and daily update checks.
TL;DR
Add one crontab line:
* * * * * /usr/bin/php /path/to/pubvana/spark cron minute >> /dev/null 2>&1
Then switch to Cron mode at Admin → Updates → Settings → Check Method → "Cron Job". That single line handles both scheduled post publishing and daily update checks.
Details
How It Works
Pubvana uses the Pubvana Cron system. When php spark cron minute is invoked, it runs every registered task that is due. Pubvana registers two tasks in app/Commands/Cron.php:
posts-publish— runs every minute. Finds any posts withstatus = 'scheduled'andpublished_at <= NOW()and publishes them. This is how scheduled posts become live on time.pubvana-update-chain— runs daily (internally cache-gated to once per 24 hours). Checks GitHub for a newer Pubvana version, applies auto-updates if enabled, then checks and updates extensions.
Adding the Crontab Entry
Open the crontab for the web server user (typically www-data on Ubuntu/Debian, apache on CentOS):
crontab -e -u www-data
Add the following line, replacing the paths with your actual PHP binary and project root:
* * * * * /usr/bin/php /var/www/html/spark cron minute >> /dev/null 2>&1
To find your PHP binary path:
which php
To find your project root, it is the directory containing the spark file — one level above public/.
Verification
After saving the crontab:
- Wait a minute and check that a scheduled test post publishes on time.
- Visit Admin → Updates and confirm the "Last checked" timestamp updates once the daily task fires.
- Check server logs if the task does not appear to run — permission errors on
sparkor thewritable/directory are common causes.
Shared Hosting (No Cron Access)
If your hosting environment does not allow cron jobs, use Page Load mode instead: Admin → Updates → Settings → Check Method → Page Load. In this mode, Pubvana piggybacks update checks onto normal web requests, cached for 24 hours. Scheduled post timing will be less precise since it depends on site traffic.
Running Commands Individually
The cron command groups related tasks by frequency. You can also run individual Spark commands directly. For example:
* * * * * /usr/bin/php /var/www/html/spark posts:publish >> /dev/null 2>&1
0 3 * * * /usr/bin/php /var/www/html/spark links:check >> /dev/null 2>&1
Using php spark cron <frequency> is the recommended approach as it groups related tasks together.