Sponsored Content
Top Forums Shell Programming and Scripting Looking out for the file-watcher Post 302764955 by Vryali on Friday 1st of February 2013 07:19:31 AM
Old 02-01-2013
This is in AutoSys? Why don't you just create a box job with 3 file watcher jobs who have dependencies on each other? Unsure if you have the few job types available in 11.0 or the many in 11.3, but it can handle simple things like new file, different file size, etc. Something like

SomeBox
SomeBox.00.EmptyDir - command, empties directory
Somebox.05.BoxStatus - No deps, just runs to see when things finish/status (optional)
SomeBox.10.FileWatch1 - timeout at X time, or at box level if more appropriate
Somebox.20.FileWatch2 - ""
Somebox.30.FileWatch3 - ""

D'no, lots of options - additionally I'm not sure what was bipinajith's simple ls solution. Assuming you have event manager component from workload manager alerts will autofire off based on whatever rules you defined (Otherwise, add a job whose condition is status failure or terminated to email).
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

file watcher job

Hello, I am trying to create a file watcher script to check for a file until certain time and throw a message. can some one please help me if there is script handy ?? Thanks, Sateesh (1 Reply)
Discussion started by: kotasateesh
1 Replies

2. UNIX for Advanced & Expert Users

File Watcher Anamolous Behaviour

My file watcher is scheduled to look for a File ABC.XYZ. Ideally when it find this file present in the directory it is looking in should end :b:, but this file watcher is wasting 6-9 minutes each day :eek: i am unable to understand why this file watcher is behaving in freakish manner...:confused: (1 Reply)
Discussion started by: sameerspice
1 Replies

3. Shell Programming and Scripting

File Watcher

Hi Please help me in this I want to execute a shell script abc.ksh. But I only want it to execute if file XYZ is not present. If file XYZ is present than I want to unix to sleep for 5 Sec and than agaian check for XYX existence. if it sleeps for more than 30 seconds ( 6 time )I want it to... (3 Replies)
Discussion started by: er_zeeshan05
3 Replies

4. Shell Programming and Scripting

File Watcher using autosys

Hi, Would like to kick off a script based on the file arrival using autosys but this has to monitor every second instead of a minute. Is there a better way to implement the monitor apart from cronjob and only need to use autosys in UNIX. Regards, Rajasilpa (0 Replies)
Discussion started by: rajasilpa
0 Replies

5. UNIX for Advanced & Expert Users

Need Script for File Watcher

Hi, I need a script for "FILE WATCHER" I have in a remote FTP location server named MAIN _104 EveryDay mrng 8 i hav to search couple of folders(COL, ATT, TRA) in that FTP server (MAIN_104), and if any files are present in that folders i hav to bring back to my computer and store it anywhere... (4 Replies)
Discussion started by: nani1984
4 Replies

6. Shell Programming and Scripting

File Watcher Help !!

Hi Experts I will have be having 3 types of files in directory file1_p0_date file1_p1_date file1_p2_date As soon as it sees any of the files it needs to kick off another process and also would need the file name For this I am creating a file watcher script which will look for file1* My... (2 Replies)
Discussion started by: westernmichnov
2 Replies

7. Shell Programming and Scripting

Help needed with File Watcher script

Hi all, I am writing a script to do the following: 1) Check if there are any new <csv> files (in abc directory) to process 2) If there is new file, then perform some operation on that file. 3) Move it to a different location(after step2 is successful) 4) Do further processing on the file ... (2 Replies)
Discussion started by: stunnerz_84
2 Replies

8. UNIX for Dummies Questions & Answers

Autosys file watcher

Hi friends, Instead of creating a script autosys 11.3 has a feature for filewatcher. Can anyone please share a link where ican create a file watcher job (more like manual). i need to create a filewatcher job where the job should search for a file for every 5 mins and send a mail whether the... (1 Reply)
Discussion started by: robertbrown624
1 Replies

9. Shell Programming and Scripting

File watcher script

if test -n "$(find/data/path/ 'filename.txst' -print-quit) then echo "file found" exit 0 else echo "file not found" exit 46 fi So I basically looking to understand the if test -n "$(find/data/path/ 'filename.txst' -print-quit) line. Pls help to elaborate what this command... (6 Replies)
Discussion started by: Nsharma3006
6 Replies

10. Shell Programming and Scripting

Help needed for Sleep (File watcher)

Hi All, I have a requirement, where I need to check for file. If file is not available then wait for 5 minutes and if it still not available, fail the process. It should check every one minute. If File available in between, should start remaining process. Now my problem is, I have both part... (0 Replies)
Discussion started by: ace_friends22
0 Replies
vm-install-jobs(8)					      System Manager's Manual						vm-install-jobs(8)

NAME
vm-install-jobs - queries and manages VM creation jobs that were started by vm-install SYNOPSIS
vm-install-jobs [options ...] DESCRIPTION
VMs may be created by vm-install interactively, or as backgrounded jobs. The vm-install-jobs command manages backgrounded VM creation jobs. OPTIONS
--cancel job-id Cancels the specified job. If the VM is still running, it is stopped. This command may return before the VM is completely stopped or the vm-install process has completely exited. The job is not implicitly deleted, so that the cancelation progress may be observed. --delete job-id Deletes the specified job. The job must be in one of the FINISHED, FAILED, or CANCELED states. The VM's configuration is deleted, as are any disks that were created during the job. --detach job-id Detaches the created VM from the specified job. The job must be in the FINISHED state. The job is deleted, but the VM's configura- tion and its disks are left intact. --list Lists all known VM creation jobs, by ID. One job ID is output per line. --status job-id Outputs the status of the specified job. JOB STATES
Every job is always in one of the following states: 0: SETTINGS 1: PREP_INSTALL 2: INSTALL 3: POST_INSTALL 4: RUNTIME_CONF 5: RUNTIME 6: FINISHED 7: FAILED 8: CANCELED The normal progression is from state 0 to state 6. States 6, 7, and 8 are terminal states. JOB STATUS
Querying the job status will print (to stdout) a number of key/value pairs. The possible keys and their meanings are: exit The exit code of the VM creation job. This key is only present once the job is in one of the states FINISHED, FAILED, or CANCELED. To interpret the meaning of the exit code, see vm-install(8) id The job ID. Always present. inotify A filename to monitor (via inotify(7) ) for state changes. The recommended inotify mask to use is IN_CLOSE_WRITE. Always present. log The location of the log file. Always present. pid The process ID of the VM creation job. This key is only present if the VM creation process is still running. The PID is used internally to cancel the job. state The job's current state. See JOB STATES. Always present. uuid The VM's UUID. This key is only present once all of the VM's settings have been gathered. vnc The last known location to view the VM's console via VNC. Note that the presence of this key does not guarantee that the VM is cur- rently running. When no authentication is necessary, the URL will be ip::port. If authentication is necessary, the URL will be username:password@ip::port. DIAGNOSTICS
A zero exit code indicates success; non-zero indicates failure. Note that the exit code of this tool indicates the success of the job management command. It does not represent the success or failure of the job itself. SEE ALSO
To interpret the exit code of a job or of this command, see vm-install(8) To monitor state changes of jobs, see inotify(7) To report problems with this software or its documentation, visit http://bugzilla.novell.com 2007-02-01 vm-install-jobs(8)
All times are GMT -4. The time now is 08:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy