rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: arriterx on February 20, 2020, 10:11:21 AM
-
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.
-
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 (https://rejetto.com/forum/index.php?action=profile;u=2913) or Rejetto (https://rejetto.com/forum/index.php?action=profile;u=1) 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 (http://rejetto.com/forum/index.php?topic=6845.0) and here (https://www.google.com/search?q=%22hfs.events%22+wait+site:rejetto.com&hl=en).
Cheers,
Leo.-
-
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
-
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.