AutoSys Workload Automation

  • 1.  Need help with "run windows" for file watcher processes

    Posted Sep 30, 2012 05:50 PM
    Hello,

    I am looking for some help...I have several file watcher jobs that I only want for them to watch for a given file during a certain period. When the end time is reached, I want it to stop watching for the file.

    How does one make that happen?


  • 2.  RE: Need help with "run windows" for file watcher processes

    Posted Oct 01, 2012 07:04 AM
    Hi,

    Could you be more spefic? Filewatcher Jobs are really there for that purpose you just mentioned.

    So, what do you want to do when the time period is over? Want the job(s) to go to faillure? Want to get an alert? Or, you don't want any alert?

    Anyway, to let the job run for an x amount of time you should give the job a max run time. This is the time calculated from when the job switched to RUNNING. NOw, you can check the box to let the Job fail or not ('Send alarm if this Job fails').

    Cheers,

    Danny


  • 3.  RE: Need help with "run windows" for file watcher processes

    Posted Oct 31, 2012 12:12 PM
    Hello, you may use the "term_run_time" attribute/field and specify the number of minutes to wait before the FW stops.
    In my example below the filewatcher watches a file for 2 hours max and then terminates.
    It verifies if the file is there each 30 seconds.
    It also gives an alarm after 1 hour, but it does not give an alarm if it terminates after 2 hours.

    insert_job: my_fw_job
    job_type: f
    box_name: my_fw_box
    machine: myserver.com
    owner: my_user
    permission: gx,ge
    condition: my_condition
    description: "FILEWATCHER that will end after 2 hours"
    term_run_time: 120
    watch_file: /tmp/my_file_to_watch.txt
    watch_interval: 30
    max_run_alarm: 60
    alarm_if_fail: 0

    But you should note that in R11 you should now use file triggers, though (from what I heard FW are not 100% supported in R11, only with legacy agents). My example is more 4.5-compatible...


  • 4.  RE: Need help with "run windows" for file watcher processes

    Posted Nov 07, 2012 12:27 PM
    I would like to understand more of the term_run_time setting.

    I use Axway to transfer data from various souce to various destination both internal and external. So the FW is looking for a file in the server's folder. if the term_run_time is set for 2 hours (from 1am to 3 am), if a 5 gb file starts to download at 2:59am, The term_run_time will terminate the FW job at 3am. Of course the successor will not start because the job will only run if the FW was success status.

    So I am told that the FW might actually cause the file transfer to cease at 3am because the term_run_time caused the FW to terminate. I disagree because all the FW job does is to watch for a file and not control the transfer of the file since the transfer is being done by Axway and has no direction interaction with AutoSys.

    So which is correct?


  • 5.  RE: Need help with "run windows" for file watcher processes

    Posted Nov 07, 2012 02:44 PM
    Your question was: I would like to understand more of the term_run_time setting.

    I use Axway to transfer data from various souce to various destination both internal and external. So the FW is looking for a file in the server's folder. if the term_run_time is set for 2 hours (from 1am to 3 am), if a 5 gb file starts to download at 2:59am, The term_run_time will terminate the FW job at 3am. Of course the successor will not start because the job will only run if the FW was success status.

    So I am told that the FW might actually cause the file transfer to cease at 3am because the term_run_time caused the FW to terminate. I disagree because all the FW job does is to watch for a file and not control the transfer of the file since the transfer is being done by Axway and has no direction interaction with AutoSys.

    So which is correct?


    I agree with your statement, the filewatcher is only watching for the file to arrive. If the filewatcher job terminates, it should not affect the file transfer itself.


  • 6.  RE: Need help with "run windows" for file watcher processes

    Broadcom Employee
    Posted Nov 13, 2012 06:57 PM
    I saw this technical document TEC542081 that explains how to specify the timeframe during which the job is allowed to start within that I thought might help you.

    TEC542081

    Title: A file watcher job with a run_window continues running past its run_window.

    Description:

    Sample job definition:

    insert_job: JOBX job_type: f
    machine: localhost
    owner: autosys
    permission: wx
    date_conditions: 1
    run_calendar: ***_Mon_thru_Fri
    exclude_calendar: ***_holidays
    start_times: "7:00"
    run_window: "7:00-15:30"
    watch_file: /tmp/foo.out
    watch_file_min_size: 10
    watch_interval: 60
    alarm_if_fail: 1
    The sample file watcher job starts at 7:00 as expected but, it does not stop at 15:30.

    Solution:

    A file watcher job will not automatically terminate or fail when it reaches the end of a run_window.

    The purpose of a run_window is to specify the timeframe during which the job is allowed to start within.

    If one wishes a job to terminate after N number of mins, the setting "term_run_time" can be used.

    For more details on run_window and term_run_time please review the document, Unicenter AutoSys Job Management Reference Guide.