Automic Workload Automation

Expand all | Collapse all

Ending a file Event

Jump to Best Answer
  • 1.  Ending a file Event

    Posted 20 days ago
    I have a file event that I want to start at 3:00PM every evening. The file event is set to look for an individual file every 10 minutes repeatedly. My intention is that when it finds the file it will run the event process and FTP the file but will then keep looking every 10 minutes for another file. I would like to have this event process stop running at 7:00PM and I am having trouble figuring out the best way to do this. I thought setting the time and date conditions of the file event would accomplish this but the event kept checking after it had passed the time in the To field of the condition. I was also looking at the max runtime settings but I have never used these and wasn't sure if that was what it was intended for. Any best practices for running a file event for a set duration?

    Jason


  • 2.  RE: Ending a file Event

    Posted 20 days ago
    We had a similar conversation recently called "How to do a file retrieval loop" where several options were suggested.

    I favor using pre-condition rules to watch for the file to arrive.  In this example, there is also a timeout feature;


    ------------------------------
    Pete
    ------------------------------



  • 3.  RE: Ending a file Event

    Posted 19 days ago
    Create two file events. Set both to 'repeat until first match' with timeout / do not start after 7pm. Put them in a sequence within a workflow.

    Voila :-).

    ------------------------------
    Swisscom Automation Engineer & PE Membership Creator

    Entfessle mehr Automic Wissen mehr Automic Tools
    https://membership.philippelmer.com/
    ------------------------------



  • 4.  RE: Ending a file Event
    Best Answer

    Posted 19 days ago
    Edited by Christoph Rekers 13 days ago
    Hi Jason,

    This does the trick (see screen shot below). As soon as EVNT1 finds the file (enter the file name - and maybe the path -  as shown in the variables tab of the workflow. It will be passed to the EVNTs and JOBFs),  JOBF1 will be started. Than EVNT2 checks for file2. If it's found, JOBF2 starts. Start the JOBP via JSCH at 3 pm. EVNT1 (and EVNT2) checks until 7pm (General tab=> Runtime=> MRT check). If it's after 7 pm it will be terminated and gets the status ENDED_TIMEOUT.  JOBF1 checks EVNT1 for status ENDED_OK=>else skip. So do both following objects: check predeseccor for status ENDED_OK=>else skip

    Cheers
    Christoph





  • 5.  RE: Ending a file Event

    Posted 19 days ago
    It seems the easiest method would be just to use a persistent file event that sits in the activity queue 24 hours a day.  On the file event tab you can place the from/to times.  Set it to check repeatedly every 10 minutes.  On the Event Process tab (!Process tab), you have your script to trigger in your file transfer process.

    The event will look for the file only during the timeframe listed.

    One note is that it may not do its first check at exactly 3PM, but would be in the first 10 minutes unless you started the event right on the hour.


  • 6.  RE: Ending a file Event

    Posted 19 days ago
    Hi Jared,

    that seems to be the easiest solution... but the task was: wait for file1, if avaiable transfer it, than wait for file2, if available transfer it. I can't see how to achieve this with a single EVNT.FILE.

    Cheers
    Christoph

    ------------------------------
    ----------------------------------------------------------------
    Automic AE Consultant and Trainer since 2000
    ----------------------------------------------------------------
    ------------------------------



  • 7.  RE: Ending a file Event

    Posted 19 days ago
    I'm reading as the first file and after it transfers that file, then it looks for a second file (same name or fits the wildcard) and then possibly another instance of the file shows up.

    If it is in fact two different files the event can just look for any file and then in the script test if the file fits the name it is looking for before triggering the file transfer process.


  • 8.  RE: Ending a file Event

    Posted 19 days ago
    Yes, this was my initial thought but in testing it doesn't seem to work. I tested it this morning by setting the from/to times to 8:30AM and 8:45AM. I started the event at 8:27AM and it went into sleeping mode until 8:30AM. I had the frequency set to every minute. There was a file available and it processed the first file successfully. I waited a few minutes and put another file out in the directory and it was processed successfully. The problem is that once it passed 8:45AM, the event just continued checking for the file every minute.



  • 9.  RE: Ending a file Event

    Posted 19 days ago
    As another test, I put a file out in the directory after the cutoff time and it did not get processed. However, the event continues to have a status of "Checking" and the report is still being updated every minute. I would have expected the event to go into a status of "Sleeping" after the cutoff time.

    Jason


  • 10.  RE: Ending a file Event

    Posted 19 days ago
    What versions of the Automation Engine and agent?  The error looks familiar and I am looking to see if I have it in my notes.


  • 11.  RE: Ending a file Event

    Posted 19 days ago
    The Automation Engine is 12.2.1 the Agent is 12.2.4.


  • 12.  RE: Ending a file Event

    Posted 19 days ago
    We're only on v12.0.9, but the only time we encountered a similar error was when we first started using login objects in file events.  The same as this linked community forum thread.

    Could it be a possible bug?


  • 13.  RE: Ending a file Event

    Posted 19 days ago
    I opened a case with the vendor to see what they say.