Using Docker for Scheduled Jobs and File Maintenance

0
7
Asked By TechExplorer99 On

I'm new to Docker and I'm exploring ways to use a container for running scheduled tasks, particularly for file maintenance activities. For example, I want to run Exiftool scripts at specific intervals. Is there a way to ensure that both the Exiftool installation and the cron schedule remain persistent even when the container is rebuilt? Would using a bind mount work for this purpose, or is there a better approach?

6 Answers

Answered By CloudGuru77 On

Look into Google Gemini; it's free and could help you get started. Just be aware that it can come with some clutter.

Answered By ScriptMasterX On

Check out how Dockerfiles work with Docker Compose. It might simplify your setup significantly.

Answered By ShellScriptPro On

You might want to try Semaphore. It's primarily a web UI for Ansible playbooks, but it can run shell scripts and allows you to schedule tasks with a cron-like syntax.

Answered By SkepticalDev88 On
Answered By CodeNinja42 On

I prefer to set up a separate container for cron tasks (or something like containered Quartz) and run Exiftool in a different container. This keeps things organized and simplifies maintenance.

CuriousCoder31 -

That's interesting! How do you set up these two separate containers?

Answered By DockerDev88 On

Consider using supercronic with an Alpine-based image. It's specifically designed for running cron jobs inside a container. You’d definitely want to use bind mounts for any necessary files, including your cron configuration.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.