How to get a piston to run daily


#1

1) Give a description of the problem
Need the piston to run daily at a time

2) What is the expected behaviour?
at 7am the piston should execute

  1. What is happening/not happening?**
    Its not running daily at 7am. I am testing it to run right now so it doesn’t say 7am at the moment. I gave it about 8 minutes after saving the now time before the time was the time listed.

  2. Post a Green Snapshot of the piston!

  3. Attach logs after turning logging level to Full**
    image

Can someone advise how I can get this to execute every day at 7am please? Im not so good at navigating the menus in WebCore so some advice on how to get to the function via what menu would be much appreciated.

Thanks


#2

When you insert a statement, use the timer statement. You get a window that looks like this:

You can execute daily, weekly, etc. In you case, use the default 1 day and set the time you desire.


#3

@guxdude’s advice is spot on. One small note to add:

The code:
pic
will only execute that one block…


Alternatively, the code:
pic
will process the entire piston, and execute anything not blocked by conditions.

Both triggers have their uses, but act very differently.


#4

and since @WCmore brought it up, to get the time happens daily you use the if block, add a condition and then change the comparison to a virtual device. Then you can select Time as the virtual device. It looks like this:

As he pointed out, it depends how you want your code to be executed.


#5

smashing its working!! thanks for the quick reply