Jump to content

Question About Time in PAL

Recommended Posts

Hi people :D well i have a question about a PAL i am writting, the problem is this in the PAL i put the hours i want to execute and action, for example:








The problem is... i don't know how to make in the PAL to say if i execute at


13:00 PM (for example)


NOT LOAD de 8 and 10 AM actions (because this is old), just ignore, somebody know how ? :) because sometimes the energy shutdown and when i start the pal script load the old actions (in time)


Thank you :thumbup:




Just i add this


var OldTime : DateTime;

OldTime := Now;


if (OldTime







Thats the idea :)

Link to comment
Share on other sites

No, no the problem is... if at the 13 PM (for example) y START the pal script... the PAL do all the action of past time in this case the 8 AM and the 10 AM


I want to know how i can say to the pal script "Don't do the old action" just wait to the another day.



Link to comment
Share on other sites

  • 1 month later...

If you have to wait inside an IF section, you can change it to a WHILE section.


For example:

    //Do stuff here

WHILE (NOW>=T['15:05:07']) AND (NOW   BEGIN
    //Do stuff here

I copy/pasted this from one of my own scripts that I use on a regular basis.


The above script (with the times shown in it) is started by the Event Scheduler shortly after 3pm (15:00:00). It then moves into the first section and waits for the set time (15:05:00). At this point I have it set a couple variables and then bypass the next section (not valid time yet), use those variables to complete a task, and then loop. When it comes around again,the first section is invalid, but the second section is now valid, so it will wait for that time.


Of course if it gets stopped and restarted after it's run the first section, it will skip that first section.


I also have this script set up (not shown here) to stop itself after running the last set time.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...