Previous SupportAlthough configuring a scheduled task of drift detection has been a feature of env zero for a while , now we provide additional drift event notifications.
- ** Schedule a drift detection job:** In the environment Settings tab, under Drift Detection, make sure you add a cron expression based on the interval you would like to check the drift. For example, if you would like to check the drift twice a day at 10AM and at 7PM, enter
00 10,19 * * *
.
Drift Detection SchedulingDespite being able to configure any cron pattern for drift detection, the minimum interval is one day for Free and plans, and one hour for Enterprise plans.The scheduler runs once an hour, and controlling the exact minute of the run within the hour is not possible.

- Add Notification: To get notified directly in Slack,Microsoft Teams, email, or Webhooks when a drift has been detected, set up notification targets and events on your project settings under Notifications.
You can set the following types of events:- Drift detected - The remote resources have been changed.
- No drift detected - The remote resources are synced with your infrastructure code.
- Drift failed - The task has failed for some reason.


These statuses will be accompanied by an informative message that links to the related Drift Detection deployment logs.
Itโs important to note that performing a new deployment on an environment with a drift will reset its status accordingly. Following a drift occurrence:


Understanding Drift Statuses
OK
: No drift has been detected; the environmentโs state matches the defined Infrastructure-as-Code (IaC) configurationError
: An error has occurred during the drift detection processDrifted
: Drift has been detected; the environmentโs state differs from the IaC configurationNever Run
: Drift detection has never been executed for this environmentDisabled
: Drift detection is disabled for this environment