Docs/Scheduling

Scheduling

reel watches for reel.io/schedule annotations on your pods, deployments, or namespaces. When it finds one, it parses the cron expression and runs the specified command automatically.

This means you can set up backups, security scans, or forensic captures without creating separate CronJobs or external schedulers. Just add an annotation and reel handles the rest.


Quick Start

Add this annotation to any pod or deployment:

annotations:
reel.io/schedule: |
0 * * * * | create layer
next | delete layer --keep-last 24

This captures a filesystem layer every hour and keeps the last 24.

How It Works

  1. 01Agent watches for reel.io/schedule annotations
  2. 02Parses cron expressions and executes commands
  3. 03next chains commands together (runs after previous completes)

Cron Syntax

┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6)
* * * * *
PatternDescription
*/15 * * * *Every 15 minutes
0 * * * *Every hour
0 */6 * * *Every 6 hours
0 2 * * *Daily at 2 AM
0 0 * * 0Weekly (Sunday midnight)

Common Schedules

Local Layer Backup

annotations:
reel.io/schedule: |
0 * * * * | create layer
next | delete layer --keep-last 24

S3 Export Configuration

To export data to S3, add these annotations to configure the destination bucket and credentials:

annotations:
reel.io/s3-bucket: <bucket-name>
reel.io/s3-region: <aws-region>
reel.io/s3-secret: <secret-name>

See S3 Exports for credential setup and authentication options.

Daily Security Scan to S3

With S3 configured, scheduled exports automatically upload to your bucket:

annotations:
reel.io/s3-bucket: company-forensics
reel.io/s3-region: us-east-1
reel.io/s3-secret: aws-s3-credentials
reel.io/schedule: |
0 2 * * * | export sbom
next | export cbom
next | export malware

Namespace-Level Schedule

Apply a schedule to a namespace and it will run for all pods in that namespace:

apiVersion: v1
kind: Namespace
metadata:
name: production
annotations:
# reel.io/s3-bucket, reel.io/s3-region, reel.io/s3-secret...
reel.io/schedule: |
0 6 * * * | export sbom
next | export cbom

Individual pods can override this with their own reel.io/schedule annotation, or opt out with reel.io/exclude: "true". See Configuration Priority for details.

Verify Your Schedule

# View all schedules
reel get schedule
# View specific pod
reel get schedule my-app -n production
# All namespaces
reel get schedule -A