Page 1 of 1
Problems with scheduler
Posted: Wed Feb 14, 2024 2:30 pm
by 4erdeb002
Hi.
Have a next worklow: WATCHFOLDER (E:\WATCHFOLDER\%i_year%-%i_mon%-%i_mday%)--->WORKFOLDER (E:\WORKFOLDER)--->XDCAM-HD--->FTP.
If it all works without a scheduler, then no problem, no any errors, but I need this task to run at a specific time. And here the problems begin - task ends with next error “
Got error code 6 - The handle is invalid, when trying to deliver "E:\WORKFOLDER\Scheduled Job". Schedule job created by default - whitout any variables and conditions, just workflow and frequency.
What is my mistake?
Re: Problems with scheduler
Posted: Wed Feb 14, 2024 7:02 pm
by emcodem
Hi @4erdeb002, welcome to the forum and thank you for using FFAStrans!
Webinterface scheduled jobs do not start/stop watchfolders, but just kick off a job. The way you currently have it, your first processor is not even executed because watchfolder processors do their job only when the worfklow is "started".
I see 2 options for you:
1) Since ffastrans 1.4 we have a feature that can start/stop watchfolders in workflow properties, called "cron". I think this is what you want.
2) You can stick to webinterface scheduler but you need to redesign your job in a way works without a Watchfolder processor. E.g. you would replace the Monitor Folder processor in your workflow by the Plugin processor "Files find" and set s_source variable to "the first found file" or alternatively store the found files in some variable and after Files find processor, use a Foreach processor to process each and every found file.
Files Find Plugin download here:
https://ffastrans.com/wiki/doku.php?id= ... processors
Re: Problems with scheduler
Posted: Wed Feb 14, 2024 7:09 pm
by emcodem
For more details on cron expression, you can hit the ? in workflow properties Window, it links some wikipedia article about cron. Additionally, i usually use some online cron expression generator like this
https://crontab.cronhub.io/
Example:
Every minute, between 12:00 AM and 12:59 AM, only on Sunday
In this example, the workflow will run 1 hour on sunday(ignore the every minute part).
Re: Problems with scheduler
Posted: Thu Feb 15, 2024 11:51 am
by 4erdeb002
Thank you very much for your help! I thought scheduler and cron were the same thing, so I didn't even try cron. But today i tried to use cron and it doesn't work. FFAStrans runs as service, i'm a single user in system (administrator account). Tried with stoped and started workflow - the result is the same. (I chose every two minutes for the example so that I don't have to wait long for the test startup)
I will try to understand the second method, although it is more difficult for me.
Re: Problems with scheduler
Posted: Thu Feb 15, 2024 2:15 pm
by emcodem
Thanks for the feedback
Ok we need to be a little more precise here:
1) you disabled/deleted the scheduled job in webinterface?
2) you entered the cron and set the worfklow into started mode?
3) now you throw a new file into the watchfolder and what happens now?
Re: Problems with scheduler
Posted: Thu Feb 15, 2024 5:08 pm
by 4erdeb002
Finally, It works)) It turns out that order matters. Previously, there were already files in the folder when I experimented with cron.
And you need to configure cron at first, and then download the file to watchfolder. The workflow must be in the status started.
Thanks again for the advice and help.
Re: Problems with scheduler
Posted: Thu Feb 15, 2024 6:17 pm
by emcodem
Perfect, thanks for letting us know