chrisb
(Chrisb)
February 1, 2014, 2:00pm
1
So I’m trying to schedule a task with a cron expression with variables. Here’s the command:
schedule ("0 $onMin $onHour ? * $state.dayOfWeek *", switchOn)
Unfortunately it doesn’t seem to work. The numbers seem to input into the variables properly, but when I trying to install I get an error saying that it can’t parse the values… then it lists the values. For example:
2:57:36 PM: error Unparseable date: "0 0 20 ? * 1,6 *"
Any ideas?
chrisb
(Chrisb)
February 4, 2014, 12:36pm
2
Bump…
Anyone have any success with scheduling cron jobs?
I did use cron in my project here: http://build.smartthings.com/projects/xively/hello-smarter-world/ and it worked.
Your cron expression has seven elements. ST example has only six (no year). It’s supposed to be optional, but who nows?
chrisb
(Chrisb)
February 5, 2014, 10:45am
5
Thx Hack for finding those links!