Problems with scheduler

Questions and answers on how to get the most out of FFAStrans
Post Reply
4erdeb002
Posts: 3
Joined: Wed Feb 14, 2024 1:50 pm

Problems with scheduler

Post 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.
Image
Image
Image
What is my mistake?
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Problems with scheduler

Post 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
emcodem, wrapping since 2009 you got the rhyme?
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Problems with scheduler

Post 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:

Code: Select all

* 0 * * 0
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).
emcodem, wrapping since 2009 you got the rhyme?
4erdeb002
Posts: 3
Joined: Wed Feb 14, 2024 1:50 pm

Re: Problems with scheduler

Post 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)
Image
I will try to understand the second method, although it is more difficult for me.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Problems with scheduler

Post by emcodem »

Thanks for the feedback :D
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?
emcodem, wrapping since 2009 you got the rhyme?
4erdeb002
Posts: 3
Joined: Wed Feb 14, 2024 1:50 pm

Re: Problems with scheduler

Post 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.
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Problems with scheduler

Post by emcodem »

Perfect, thanks for letting us know :D
emcodem, wrapping since 2009 you got the rhyme?
Post Reply