
Scheduled jobs in Optimizely CMS are a powerful way to automate any background tasks like content cleanup, indexing, or reporting.
I created a simple scheduled job to delete the expired content.
Let’s get started.
Step 1: Create the Job Class
- Created a job called ExpiredPagesCleanupJob.cs that inherits the ScheduledJobBase class.
- Implement logger as needed, currently commented out in code.
- Rebuild and deploy the solution.
Step 2: Run the job
- Wondering, don’t I need to register the job in Optimizely CMS? No need, it automatically registers the job using the [ScheduledPlugin] attribute.

- Let’s navigate to Settings -> Scheduled Jobs
- Now you will see the job listed and ready to be started.
- Let’s start the job manually for now.

- History shows whether the job has succeeded or not.

- Before running the job, the Expired Page report showed that two content pages had expired.

- Now let’s check the reporting results again. yay! It’s successfully deleted!

- You can schedule the job every 5 seconds, minutes, hourly, and so on.

If you prefer watching a video, my quick recording –
Hope this helps.
Happy Optimizing!







