Skip to content

Commit c9c5733

Browse files
committed
feat: add every_5_minutes example to match documentation
- Added the missing every_5_minutes cron script example to examples/resources/coder_script/resource.tf - This example demonstrates the 6-field cron format with a health check that runs every 5 minutes - Ensures examples directory matches the documentation examples
1 parent a219015 commit c9c5733

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

examples/resources/coder_script/resource.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ resource "coder_script" "nightly_update" {
4040
EOF
4141
}
4242

43+
resource "coder_script" "every_5_minutes" {
44+
agent_id = coder_agent.dev.agent_id
45+
display_name = "Health check"
46+
icon = "/icon/heart.svg"
47+
cron = "0 */5 * * * *" # Run every 5 minutes
48+
script = <<EOF
49+
#!/bin/sh
50+
echo "Health check at $(date)"
51+
EOF
52+
}
53+
4354
resource "coder_script" "shutdown" {
4455
agent_id = coder_agent.dev.id
4556
display_name = "Stop daemon server"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy