Scheduled Optimization
Automatically optimize new images during off-peak hours
This is a Pro feature. Activate your license to use it.
Scheduled Optimization runs Compresso's bulk optimizer automatically on a set schedule — daily or weekly — during off-peak hours when your server is least busy. Only images that haven't been optimized yet are processed on each run, so it's safe to leave enabled at all times.
Setting Up a Schedule
- Go to Compresso > Settings
- Open the Advanced Settings section
- Find Scheduled Optimization and toggle it on
- Choose a Frequency — Daily or Weekly
- If weekly, choose the Day of Week
- Set the Time to run (your site's configured timezone is used)
- Save settings
The schedule takes effect immediately. Compresso registers a recurring background job via Action Scheduler, so it will run even if no one is logged in to your site.
Scheduled times use your WordPress timezone. Go to Settings > General > Timezone to confirm it's set correctly before configuring a schedule.
How It Works
When the scheduled time arrives:
- Compresso queries your media library for any images that haven't been optimized yet
- Each pending image is added to the background queue as an individual job
- Jobs are processed by Action Scheduler — one image at a time, with automatic retries on failure
- Already-optimized images are skipped entirely — the scheduler never re-processes them unless you manually trigger Re-optimize All
This means the scheduler is safe to leave running even after your library is fully optimized — it simply finds nothing to do and exits cleanly.
Relationship to Manual Bulk Optimization
Scheduled optimization and manual bulk optimization use the same underlying queue. If a manual bulk run is already active when the schedule fires, the scheduler will skip that run to avoid conflicts. The next scheduled run will pick up any remaining images.
Checking That It's Running
Go to Tools > Scheduled Actions in your WordPress admin (this is a built-in WordPress screen). Search for compresso_scheduled_optimize to see:
- When the action last ran
- When it's next scheduled to run
- Whether any runs failed
If the action doesn't appear here, save your Scheduled Optimization settings again — this will re-register the Action Scheduler job.
Disabling the Schedule
Toggle Scheduled Optimization off in Settings and save. Compresso immediately unregisters the recurring Action Scheduler job. Any images already in the queue will continue processing; no new runs will be triggered.
Troubleshooting
The schedule isn't running. Check that Action Scheduler is working — go to Tools > Scheduled Actions and verify compresso_scheduled_optimize appears with a future next-run date. Also confirm your WordPress timezone is set correctly, as a misconfigured timezone can cause the first run to be scheduled far in the future.
All my images already show as optimized but the scheduler runs anyway. The scheduler exits immediately when there are no pending images — no harm done. You'll see a brief log entry confirming zero images were queued.
Scheduled optimization and a manual bulk run are both active. The scheduler detects an active bulk run and skips its run cleanly. The manual run finishes normally and the scheduler resumes on its next occurrence.