Sponsored Content
Full Discussion: Autosys file watcher
Top Forums UNIX for Dummies Questions & Answers Autosys file watcher Post 302648581 by sameermohite on Wednesday 30th of May 2012 06:19:44 AM
Old 05-30-2012
Autosys file watcher

Autosys uses "jil" to add job (watcher/command/box etc)
It is basically job description. For e.g. your filewatcher job will have
You can set these fields
-----------------------------------------------------
insert_job: JOBNAME
job_type: f
watch_file: FILENAME
watch_interval: time_in_mins
-----------------------------------------------------


Please google for better examples of Autosys Jil for filewatcher jobs
 

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. Shell Programming and Scripting

Looking out for the file-watcher

Hi friends, I do not have much thoughts so need any help on the below issue: I need to create shell script that will find the files & throw an error through job (autosys) when file not found. Daily we use to receive 3 files from a system. Obstacles: 1) All 3 files names are same. 2)... (4 Replies)
Discussion started by: tush
4 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
pm::Helper(3)						User Contributed Perl Documentation					     pm::Helper(3)

NAME
Gtk2::Helper - Convenience functions for the Gtk2 module SYNOPSIS
use Gtk2::Helper; # Handle I/O watchers easily, like Gtk 1.x did $tag = Gtk2::Helper->add_watch ( $fd, $cond, $callback, $data ) $rc = Gtk2::Helper->remove_watch ( $tag ) ABSTRACT
This module collects Gtk2 helper functions, which should make implementing some common tasks easier. DESCRIPTION
Gtk2::Helper->add_watch ( ... ) $tag = Gtk2::Helper->add_watch ( $fd, $cond, $callback, $data ) This method is a wrapper for Glib::IO->add_watch. The callback is called every time when it's safe to read from or write to the watched filehandle. $fd Unix file descriptor to be watched. If you use the FileHandle module you get this value from the FileHandle->fileno() method. $cond May be either 'in' or 'out', depending if you want to read from the filehandle ('in') or write to it ('out'). $callback A subroutine reference or closure, which is called, if you can safely operate on the filehandle, without the risk of blocking your application, because the filehandle is not ready for reading resp. writing. But aware: you should not use Perl's builtin read and write functions here because these operate always with buffered I/O. Use low level sysread() and syswrite() instead. Otherwise Perl may read more data into its internal buffer as your callback actually consumes. But Glib won't call the callback on data which is already in Perl's buffer, only when events on the the underlying Unix file descriptor occur. The callback subroutine should return always true. Two signal watchers are connected internally (the I/O watcher, and a HUP watcher, which is called on eof() or other exceptions). Returning false from a watcher callback, removes the correspondent watcher automatically. Because we have two watchers internally, only one of them is removed, but probably not both. So always return true and use Gtk2::Helper->remove_watch to disable a watcher, which was installed with Gtk2::Helper->add_watch. (Gtk2::Helper could circumvent this by wrapping your callback with a closure returning always true. But why adding another level of indirection if writing a simple "1;" at the end of your callback solves this problem? ;) $data This data is passed to the callback. $tag The method returns a tag which represents the created watcher. Later you need to pass this tag to Gtk2::Helper->remove_watch to remove the watcher. Example: # open a pipe to a ls command use FileHandle; my $fh = FileHandle->new; open ($fh, "ls -l |") or die "can't fork"; # install a read watcher for this pipe my $tag; $tag = Gtk2::Helper->add_watch ( $fh->fileno, 'in', sub { watcher_callback( $fh, $tag ); }); sub watcher_callback { my ($fh, $tag) = @_; # we safely can read a chunk into $buffer my $buffer; if ( not sysread($fh, $buffer, 4096) ) { # obviously the connected pipe was closed Gtk2::Helper->remove_watch ($tag) or die "couldn't remove watcher"; close($fh); return 1; } # do something with $buffer ... print $buffer; # *always* return true return 1; } Gtk2::Helper->remove_watch ( ... ) $rc = Gtk2::Helper->remove_watch ( $tag ) This method removes a watcher, which was created using Gtk2::Helper->add_watch(). $tag This is the tag returned from Gtk2::Helper->add_watch(). $rc The method returns true, if the watcher could be removed successfully, and false if not. SEE ALSO
perl(1), Gtk2(1) AUTHOR
Joern Reder <joern AT zyn.de> COPYRIGHT AND LICENSE
Copyright 2003 by Joern Reder This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA. perl v5.12.1 2009-05-17 pm::Helper(3)
All times are GMT -4. The time now is 11:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy