Skip to content

Instantly share code, notes, and snippets.

@adamalex
Last active August 29, 2015 14:03
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamalex/b5fb7f6b42caba4c3413 to your computer and use it in GitHub Desktop.
Save adamalex/b5fb7f6b42caba4c3413 to your computer and use it in GitHub Desktop.
CoreOS units for cron-like behavior
  1. fleetctl load *
  2. fleetctl start *.timer
[Unit]
Description=echooneshot
Requires=docker.service
[Service]
Type=oneshot
ExecStart=/usr/bin/echo hello world
[Unit]
Description=echooneshot
Requires=docker.service
[Timer]
OnCalendar=*:*:00
[X-Fleet]
X-ConditionMachineOf=echooneshot.service
[Unit]
Description=echosimple
Requires=docker.service
[Service]
ExecStart=/usr/bin/echo hello world
[Unit]
Description=echosimple
Requires=docker.service
[Timer]
OnCalendar=*:*:00
[X-Fleet]
X-ConditionMachineOf=echosimple.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment