Skip to main content
Rule scheduling automatically publishes and unpublishes merchandising rules based on time windows, so you don’t have to switch time-based promotions and seasonal merchandising on and off by hand.

How scheduling works

When you configure a schedule for a rule, you set:
  • Start date and time: When the rule should automatically publish
  • End date and time (optional): When the rule should automatically unpublish
Layers checks scheduled rules continuously, and changes typically take effect within about a minute of the configured time. Scheduling behavior:
  • Rules with a start time in the past and no end time (or end time in the future) are automatically published
  • Rules with an end time in the past are automatically unpublished
  • Rules with a start time in the future stay unpublished until that time arrives
  • If no end time is specified, the rule stays published indefinitely after the start time
Scheduled rules work independently of contextual conditions. A rule must pass both its schedule check and contextual conditions (if any) to be applied.

Publication states

Every rule has a single publication state derived from its schedule and published status: The state appears as a badge in the Status column of the Merchandising Rules list. Hover a scheduled rule’s badge to see its exact start and end dates. To narrow the table, use the Status filter, which offers Live, Scheduled, Ended, and Draft. The Live filter option matches rules with the Published badge. While editing a scheduled or ended rule, a banner below the page header summarizes the state, for example when the rule will publish automatically or when it was unpublished. The Scheduling tab in the sidebar shows the same status alongside the date fields.

Publishing and schedules

The publish controls respect the schedule window, so a rule can never be flipped into a state its schedule would immediately revert:
  • Publishing outside the window is rejected. If you try to publish a rule whose schedule has ended or has not started yet, Layers rejects the change with a message naming the blocking date. Extend the end date, move the start date, or clear the schedule to publish.
  • Saving a schedule that excludes now unpublishes the rule. If a live rule’s schedule is edited so the window no longer covers the current time, Layers unpublishes it immediately instead of waiting for the scheduler.
  • Past end dates require an explicit unpublish. You cannot move the end date into the past as part of a normal save. Use Unpublish now instead. Rules whose end date already passed remain fully editable.

Publish now and unpublish now

When a rule has a schedule, the Publish / Unpublish button in the editor header asks for confirmation because it changes the schedule:
  • Publish now clears the schedule so the rule goes live immediately and stays live until you unpublish it.
  • Unpublish now sets the end date to the current time, unpublishing the rule immediately.
Both dialogs include an Edit schedule option that opens the Scheduling tab instead, so you can adjust the dates rather than override them.

Schedule changes in Config History

When a schedule publishes or unpublishes a rule, Layers records the change in Config History with a reason such as Published — schedule started or Unpublished — schedule ended. The reason lets you tell automatic schedule flips apart from manual edits.

Use cases

Flash sales: Schedule a rule to publish at the start of a flash sale and unpublish when it ends. Seasonal campaigns: Set up holiday merchandising weeks in advance that automatically activate on the campaign start date. Product launches: Schedule merchandising for new product releases to go live at a specific time. Time-zone specific promotions: Combine scheduling with geographic conditions to run promotions at specific times in different regions.

Combining scheduling with contextual conditions

You can use both scheduling and contextual conditions on the same rule: Example: A Black Friday rule that only applies to US visitors and automatically publishes on Black Friday morning and unpublishes on Monday morning.
The rule is only active during the Black Friday weekend AND only for US visitors.

See also