GecKoTDF Posted March 7, 2011 Share Posted March 7, 2011 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: PAL.WaitForTime('08:00:00'); Something PAL.WaitForTime('10:00:00'); Something 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 SOLVED Just i add this var OldTime : DateTime; OldTime := Now; if (OldTime begin something end; Thats the idea Link to comment Share on other sites More sharing options...
shoutcaststreaming Posted March 7, 2011 Share Posted March 7, 2011 PAL.WaitForTime('13:00:00');I have no clue what you said after the "the problem is ..." SCS - Dedicated Bandwidth Servers Shoutcast / Icecast / Windows Media Transcoding - Auto DJ - Mobile Radio - FLASH Players - Auto DJ Broadcasting World's Stream Host of the Month Link to comment Share on other sites More sharing options...
GecKoTDF Posted March 7, 2011 Author Share Posted March 7, 2011 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. SOLVED FIRST POST Link to comment Share on other sites More sharing options...
The Hermit Posted April 18, 2011 Share Posted April 18, 2011 If you have to wait inside an IF section, you can change it to a WHILE section. For example: WHILE (NOW BEGIN PAL.WaitForTime(T['15:05:00']); //Do stuff here END; WHILE (NOW>=T['15:05:07']) AND (NOW BEGIN PAL.WaitForTime(T['19:32:00']); //Do stuff here END; 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.