Cron Jobs & Sync

Kanbanz registers a single cron event, and only while Deskuss is active.

The kanbanz_sync_cron event

PropertyValue
Hookkanbanz_sync_cron
Schedulehourly
Registered whenDeskuss is active and Auto-sync from Deskuss is on (option kanbanz_cron_enabled)
Removed whenKanbanz is deactivated

Each run catches up on anything the real-time hooks missed:

  1. Updates the team on every department board from the department's current staff.
  2. Creates boards for departments that don't have one yet.
  3. Creates tasks for open tickets that don't have one yet.
  4. 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:

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:

  1. Add this line to wp-config.php: define('DISABLE_WP_CRON', true);
  2. 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