mirror of
				https://github.com/willfarrell/docker-crontab.git
				synced 2025-11-04 07:35:19 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			TOML
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			TOML
		
	
	
	
	
	
# toml files can only have top-loevl mappings, so this is the only sample
 | 
						|
["cron with triggered commands"]
 | 
						|
comment = "cron with triggered commands"
 | 
						|
schedule = "* * * * *"
 | 
						|
command = "echo hello"
 | 
						|
project = "crontab"
 | 
						|
container = "myapp"
 | 
						|
[["cron with triggered commands".trigger]]
 | 
						|
command = "echo world"
 | 
						|
container = "crontab_myapp_1"
 | 
						|
 | 
						|
["map a volume"]
 | 
						|
comment = "map a volume"
 | 
						|
schedule = "* * * * *"
 | 
						|
dockerargs = "-d -v /tmp:/tmp"
 | 
						|
command = "echo new"
 | 
						|
image = "alpine:3.5"
 | 
						|
 | 
						|
["use an ENV from inside a container"]
 | 
						|
comment = "use an ENV from inside a container"
 | 
						|
schedule = "@hourly"
 | 
						|
dockerargs = "-d -e FOO=BAR"
 | 
						|
command = "sh -c 'echo hourly ${FOO}'"
 | 
						|
image = "alpine:3.5"
 | 
						|
 | 
						|
["trigger every 2 min"]
 | 
						|
comment = "trigger every 2 min"
 | 
						|
schedule = "@every 2m"
 | 
						|
command = "echo 2 minute"
 | 
						|
image = "alpine:3.5"
 | 
						|
[["trigger every 2 min".trigger]]
 | 
						|
command = "echo world"
 | 
						|
container = "crontab_myapp_1"
 | 
						|
 | 
						|
["? /usr/sbin/logrotate /etc/logrotate.conf*/5 * * * *"]
 | 
						|
schedule = "*/5 * * * *"
 | 
						|
command = "/usr/sbin/logrotate /etc/logrotate.conf"
 | 
						|
 | 
						|
["Regenerate Certificate then reload nginx"]
 | 
						|
comment = "Regenerate Certificate then reload nginx"
 | 
						|
schedule = "43 6,18 * * *"
 | 
						|
command = "sh -c 'dehydrated --cron --out /etc/ssl --domain ${LE_DOMAIN} --challenge dns-01 --hook dehydrated-dns'"
 | 
						|
dockerargs = "--env-file /opt/crontab/env/letsencrypt.env -v ${PWD}:/etc/ssl -v webapp_nginx_acme_challenge:/var/www/.well-known/acme-challenge"
 | 
						|
image = "willfarrell/letsencrypt"
 | 
						|
onstart = true
 | 
						|
[["Regenerate Certificate then reload nginx".trigger]]
 | 
						|
command = "sh -c '/etc/scripts/make_hpkp ${NGINX_DOMAIN} && /usr/sbin/nginx -t && /usr/sbin/nginx -s reload'"
 | 
						|
project = "conduit"
 | 
						|
container = "nginx"
 | 
						|
 |