Cron Jobs & Sync
Kanbanz registers a single cron event, and only while Deskuss is active.
The kanbanz_sync_cron event
| Property | Value |
|---|---|
| Hook | kanbanz_sync_cron |
| Schedule | hourly |
| Registered when | Deskuss is active and Auto-sync from Deskuss is on (option kanbanz_cron_enabled) |
| Removed when | Kanbanz is deactivated |
Each run catches up on anything the real-time hooks missed:
- Updates the team on every department board from the department's current staff.
- Creates boards for departments that don't have one yet.
- Creates tasks for open tickets that don't have one yet.
- Moves orphaned ticket tasks back onto the right board.
The results are saved in the kanbanz_last_cron_sync option and shown under Settings → Deskuss Integration.
Without Deskuss, Kanbanz schedules no cron jobs. Normal board activity (moving cards, editing tasks) never relies on cron. It saves instantly over AJAX.
Running the sync manually
In the admin, use any one of:
- Kanbanz → Settings → Deskuss Integration → Run Sync Now.
- The Sync Departments button on the board listing.
With WP-CLI:
# Is the event scheduled?
wp cron event list --fields=hook,next_run_relative,recurrence | grep kanbanz
# Run it now
wp cron event run kanbanz_sync_cron
Using a real server cron
WP-Cron only runs when someone visits your site. On low-traffic sites the hourly sync can run late. On busy sites it adds a little work to page loads. To use a real server cron instead:
- Add this line to
wp-config.php:define('DISABLE_WP_CRON', true); - Add one of these to your crontab (
crontab -e):# with WP-CLI */5 * * * * cd /path/to/wordpress && wp cron event run --due-now >/dev/null 2>&1 # or over HTTP */5 * * * * curl -s https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1