Skip to content

Commit

Permalink
Merge pull request StackStorm#2700 from peak6/linux-sleep-until
Browse files Browse the repository at this point in the history
Adding linux.sleep_until action
  • Loading branch information
lakshmi-kannan authored Jun 13, 2016
2 parents 3ae0325 + 7afc3d8 commit 7ae5f8e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions contrib/packs/linux/actions/sleep_until.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: "sleep_until"
pack: "linux"
description: "Sleeps until a specified time"
enabled: true

runner_type: "local-shell-cmd"
entry_point: ""

parameters:
time:
type: string
description: 'the time to wake up; must be smaller than the action timeout; must be parsable by "date -d" like "5pm today" or "Thu May 19 18:04:39 UTC 2016"'
required: true
cmd:
default: 'sleep $(expr `date -d "{{ time }}" +%s` - `date -d "now" +%s`)'
immutable: true

0 comments on commit 7ae5f8e

Please sign in to comment.