Skip to main content
Rule scheduling allows you to automatically enable and disable merchandising rules based on time windows. This eliminates manual intervention for time-based promotions and seasonal merchandising.

How scheduling works

When you configure a schedule for a rule, you set:
  • Start date and time: When the rule should automatically enable
  • End date and time (optional): When the rule should automatically disable
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 enabled
  • Rules with an end time in the past are automatically disabled
  • Rules with a start time in the future remain disabled until that time arrives
  • If no end time is specified, the rule remains enabled 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 on the Merchandise list, where the Status filter lets you narrow the table to any combination of states. A Schedule column shows when each rule starts or ends, with the exact date available on hover. 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. This lets you tell automatic schedule flips apart from manual edits.

Use cases

Flash sales: Schedule a rule to enable at the start of a flash sale and disable 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 for powerful targeting: Example: A Black Friday rule that only applies to US visitors and automatically enables on Black Friday morning and disables on Monday morning.
This rule will only be active during the Black Friday weekend AND only for US visitors.

See also