Run scheduled jobs in containers.
BeginnerScenarioCI/CD and production rollouts
Answer
Situation read → Periodic tasks like cleanup.
What I'd do → Use the host's cron/systemd timer calling docker run --rm job:1.0, or a scheduler container, or Kubernetes CronJob. Avoid running crond inside app containers.
Why → Jobs get their own limits, logs and exit codes.
Interview tip → Make jobs idempotent.
More on CI/CD and production rollouts
Design a GitHub Actions workflow that builds, scans and pushes an image.IntermediateZero-downtime deploy on a single Docker host.AdvancedDeploy via GitOps with image digests.IntermediateCanary a new image on a Swarm service.AdvancedDocker build is flaky in CI due to network errors on package installs.IntermediateRun database migrations in the deploy flow of containerized apps.Intermediate