AWS Alarm expression metric triggering ECS Auto Scale policy time + cpu utilization not triggering

Solution for AWS Alarm expression metric triggering ECS Auto Scale policy time + cpu utilization not triggering
is Given Below:

Desired effect: scale down instance after 23 and before 11 UTC and CPU.

The alarm chart looks right, but the alarm is not being triggered. Threshold >= 1, but it only taggers randomly, most of the time it doesn’t at all.

{
    "metrics": [
        [ "AWS/ECS", "CPUUtilization", "ClusterName", "fargate-test", "ServiceName", "api", { "stat": "Average", "id": "cpu", "visible": false } ],       
        [ { "id": "scale_down_hours_cpu", "label": "scale-down-hours-cpu", "expression": "(IF(HOUR(cpu) < 11, 1, 0) OR IF(HOUR(cpu) >= 23, 1, 0)) AND IF(cpu <= 10, 1, 0)", "visible": true } ],
        [ { "id": "scale_down_cpu", "label": "scale-down-cpu", "expression": "IF(cpu < 10, 1, 0)", "visible": false } ]
    ],
    "view": "timeSeries",
    "stacked": false,
    "period": 60,
    "region": "us-east-1"
}

Shown here the desired trigger events <11 >=23 UTC

enter image description here

enter image description here

The cpu utilization during these hours is 1%

enter image description here

Sometimes it works (I changed it to 10 points) and I don’t understand why:
enter image description here