Does azure blob storage lifecycle count time or just date?

Viewed 518

We defined data from azure blob container to be deleted after 1 day with the following policy

{
  "rules": [
    {
      "name": "expirationRule",
      "enabled": true,
      "type": "Lifecycle",
      "definition": {
        "filters": {
          "blobTypes": [ "blockBlob" ]
        },
        "actions": {
          "baseBlob": {
            "delete": { "daysAfterModificationGreaterThan": 1 }
          }
        }
      }
    }
  ]
}

We know that platform runs the lifecycle policy once a day. And it will delete files, but will it count hours, minutes, or just take days.

For example, I upload a file at 9:00, I will create a lifecycle at 13:00. The container will trigger lifecycle tomorrow at 13:00 and delete the file or it will be deleted the day after tomorrow after a full day?

1 Answers

For the first time to run lifecycle management policy, it can take up to 24 hours to run the policy.

For example, you upload a file at 9:00 AM today, and then create a lifecycle policy at 13:00 PM today. The file will be deleted within 24 hours. It means that the file will be deleted at any time between 13:00 PM today and 13:00 PM tomorrow.

Related