Sign inSign up

stevenmassaro/recurring-task-base

By stevenmassaro

Updated about 1 month ago

Docker image that runs a command with a specified delay

Image
0

1.7K

stevenmassaro/recurring-task-base repository overview

Recurring Task Docker Base

ci Docker

A simple Docker image that repeatedly runs a command with a specified delay.

Usage

As a standalone image
Environment variables:
NameRequiredDefault valueExample valueDescription
COMMANDYesecho Hello
AFTER_COMMANDNoecho Hello afterCommand that should be executed after COMMAND
DELAYNo1d7d (or any other permissible value for the sleep command)
ADJUST_FOR_RUNTIMENotruefalseIf set to true, subtracts the execution time of the task from the delay, ensuring the scheduler runs at consistent intervals (e.g., the same time each day).
CHECK_LAST_RUNTIMENofalsetrueIf set to true, checks when the task last ran and waits if needed to ensure the specified delay has passed since the last execution.
LAST_RUNTIME_FILENo/tmp/last_runtime/var/log/last_runtimeFile to store the timestamp of the last execution when CHECK_LAST_RUNTIME is enabled.
HEALTHCHECKS_URLNohttps://hc-ping.com/your-uuidIf set, sends ping to healthchecks.io before and after the main command (success or fail).
As the base image of another project

See this project for an example of how to use this image as your base docker image.

Tag summary

Content type

Image

Digest

sha256:3a3d4b6a2

Size

6.5 MB

Last updated

about 1 month ago

docker pull stevenmassaro/recurring-task-base