Scheduling

Set up automatic recurring imports using WordPress cron scheduling

Overview

Scheduling allows you to automatically run imports at regular intervals without manual intervention. This is perfect for keeping your store synchronized with supplier feeds, updating prices and inventory, or importing new products on a schedule.

PrimeLink uses WordPress cron to schedule imports. You can set up hourly, daily, weekly, or monthly schedules, or use custom cron expressions for more complex timing.

Enabling Scheduling

Step 1: Access Scheduling Options

In Step 6 (Options & Scheduling) of the import wizard:

  1. Scroll to the Automatic Scheduling section
  2. Check the Enable Background Import Schedule checkbox
  3. The scheduling options will become available

Step 2: Configure Schedule Type

Choose how often the import should run:

Preset Intervals

  • Hourly: Run every hour
  • Twice Daily: Run twice per day (typically morning and evening)
  • Daily: Run once per day
  • Weekly: Run once per week
  • Monthly: Run once per month

Custom Cron Expression

For advanced scheduling, you can use cron expressions:

  • Format: minute hour day month weekday
  • Example: 0 2 * * * = Daily at 2:00 AM
  • Example: 0 */6 * * * = Every 6 hours
  • Example: 0 9 * * 1 = Every Monday at 9:00 AM

Advanced Scheduling Options

Timezone Selection

Set the timezone for your schedule:

  • Select your timezone from the dropdown
  • All scheduled times will use this timezone
  • Default: Uses WordPress timezone setting

Start Date and End Date

Control when the schedule starts and ends:

  • Start Date: When to begin the scheduled imports (optional)
  • End Date: When to stop the scheduled imports (optional)
  • Leave empty for indefinite scheduling

Maximum Runs Limit

Limit how many times the import can run:

  • Set a maximum number of runs
  • Schedule will stop after reaching the limit
  • Useful for one-time or limited-time promotions

Retry on Failure

Configure automatic retry behavior:

  • Enable retry if import fails
  • Set number of retry attempts
  • Set delay between retries

Pause Schedule on Error

Automatically pause scheduling if errors occur:

  • Enable to pause schedule after X consecutive failures
  • Prevents repeated failed imports
  • Requires manual intervention to resume

Email Notifications

Configure Notifications

Receive email notifications for scheduled imports:

  • Custom notification email address
  • Email on completion
  • Email on errors
  • Email template customization

Email Placeholders

Use placeholders in email templates:

  • {import_id} - Import ID
  • {status} - Import status
  • {created} - Number of items created
  • {updated} - Number of items updated
  • {skipped} - Number of items skipped
  • {errors} - Number of errors

Managing Scheduled Imports

Viewing Scheduled Imports

To view all scheduled imports:

  1. Go to PrimeLink → Imports
  2. Look for imports with a schedule indicator
  3. View next run time and schedule details

Pausing Schedules

To temporarily pause a scheduled import:

  1. Find the import in the list
  2. Click Pause Schedule or edit the import
  3. Uncheck "Enable Background Import Schedule"
  4. Save the changes

Resuming Schedules

To resume a paused schedule:

  1. Edit the import
  2. Go to Step 6
  3. Re-enable "Enable Background Import Schedule"
  4. Save the changes

Editing Schedules

To modify a schedule:

  1. Edit the import
  2. Go to Step 6 (Options & Scheduling)
  3. Modify the schedule settings
  4. Save the changes
  5. The new schedule will take effect on the next run

WordPress Cron vs External Cron

WordPress Cron (Default)

WordPress cron runs when someone visits your site:

  • Triggers on page visits
  • No server configuration needed
  • May have slight delays if site has low traffic
  • Best for most use cases

External Cron (Advanced)

For more reliable scheduling, use external cron:

  • Configure a server cron job to hit WordPress cron endpoint
  • More reliable timing
  • Requires server access
  • Best for high-traffic sites or critical imports
💡 Tip: For most stores, WordPress cron is sufficient. Only use external cron if you need precise timing or have issues with WordPress cron reliability.

Cron Expression Reference

Format

Cron expressions use the format: minute hour day month weekday

Field Values

  • Minute: 0-59
  • Hour: 0-23 (24-hour format)
  • Day: 1-31
  • Month: 1-12
  • Weekday: 0-7 (0 and 7 = Sunday, 1 = Monday, etc.)

Special Characters

  • * - Any value
  • , - Value list separator (e.g., 1,3,5)
  • - - Range (e.g., 1-5)
  • / - Step values (e.g., */6 = every 6 units)

Common Examples

  • 0 * * * * - Every hour at minute 0
  • 0 */6 * * * - Every 6 hours
  • 0 2 * * * - Daily at 2:00 AM
  • 0 9 * * 1 - Every Monday at 9:00 AM
  • 0 0 1 * * - First day of every month at midnight
  • 0 9,17 * * 1-5 - Weekdays at 9:00 AM and 5:00 PM

Best Practices

  • Schedule during off-peak hours: Run imports when site traffic is low
  • Set reasonable intervals: Don't schedule too frequently (wastes resources)
  • Monitor first few runs: Check that scheduled imports complete successfully
  • Use email notifications: Stay informed about import status
  • Set end dates: For temporary imports, set an end date
  • Test before scheduling: Run a manual import first to verify configuration
  • Use incremental updates: Enable incremental import for faster scheduled runs

Troubleshooting

Scheduled Import Not Running

  • Check that scheduling is enabled in Step 6
  • Verify WordPress cron is working (check cron events in WordPress)
  • Ensure site receives regular traffic (for WordPress cron)
  • Check for PHP errors in logs
  • Verify import configuration is still valid

Schedule Running Too Frequently

  • Check the schedule interval setting
  • Verify cron expression if using custom schedule
  • Check for duplicate cron events

Schedule Stopped Unexpectedly

  • Check if "Pause Schedule on Error" is enabled
  • Review import logs for errors
  • Check if maximum runs limit was reached
  • Verify end date hasn't passed

Next Steps

📥 Creating Imports

Learn the complete import process

Learn More →
🔄 Rollback & Tracking

Track and rollback scheduled imports

Learn More →
⚙️ Performance

Optimize scheduled imports for better performance

Learn More →