rejetto forum

hfs.events timed events question

0 Members and 1 Guest are viewing this topic.

Offline arriterx

  • Occasional poster
  • *
    • Posts: 1
    • View Profile
Hello,
I would like to schedule a task every 15 minutes using timed events in hfs.events.
Since the event would launch .bat file which scans for .ts files in VFS and converts them to .m3u8, and could possibly take longer than 15 minutes to convert all files found, I would liek to know will the next scheduled event start even if the previous even action is yet to completed?

Example:
Event started at 12:45, event execution presumably will end at 13:10, will the next event still be started at 13:00?

Thank you in advance for your input.


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 842
  • Status: On hiatus (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
Hi!, welcome to the forum. :)

I'm not expert on this, but I'm afraid that yes, it will start the task every 15 minutes, no matter if the previous task was completed. Unless you add some kind of 'task detection', it will overlap your previous task. Other users like Mars or Rejetto could give you more details, but if you share here the contents of your 'hfs.events' file, it will be easier for other users to help you.

You could find more info about 'hfs.events', here and here.

Cheers,
Leo.-
« Last Edit: February 20, 2020, 10:34:54 AM by LeoNeeson »
HFS in Spanish (HFS en Español) / How to compile HFS (Tutorial)
» Currently taking a break, until HFS v2.4 get his stable version.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
when the event start,  hfs can create a txt file  with some word, and then launch the external task

while the task is running, hfs is waiting to run the next event, 

at the begining of the event, hfs read the txt and if the content is not empty it will run a break macro to stop the script event, 

at the end of task,  batch script must delete the txt file to inform hfs that the job has finish..

next time event is running  the txt will be created and hfs launch new task


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
i don't remember if the execution waits or not.
I would bet it doesn't, unless you use the out parameter, but antway i would make an experiment to know it.
I would do as Mars suggested: your batch file could itself create a "locking" file, which existence will prevent other executions, and it's deleted at the end.