11-03-2006
Problem with filewatcher...
Hi everyone,
Please find the script for Filewatcher rule file,which does the simple job of moving the files whenever it dectects to another directory.And whenever it detects the cmd_mm.stop file,it should terminate the job.
INTERVAL 60
ON_FILEWATCH ${HLD}/CMD/* CREATE 0 1 2 0400 5
THEN
DO_CMD mv ${HLD}/CMD/* ${HLD}/CMD_SCRIPTS
ELSE
DO_CMD echo "File not detected."
END_ON
#The following command watches for stop file to terminate the job for the day.
ON_FILEWATCH ${HLD}/CMD/cmd_mm.stop CREATE 0 0 30 0400 31
THEN
DO_CMD rm ${HLD}/CMD/cmd_mm.stop
DO_OK
END_ON
Now the problem is that creation of cmd_mm.stop file of zero size doesn't seem to terminte the job.The job simply moves cmd_mm.stop file to ${HLD}/CMD_SCRIPTS directory and carries on and on with filewatching.
(Note:cmd_mm.stop file is of zero size.)
Thoughts plz?
Thanks for all the solutions that I've got from experts of this forum.
Bhagat
10 More Discussions You Might Find Interesting
1. Solaris
Hi
I am right now facing a strange hardware problem. System get booted with the following error:
Fatal Error Reset
CPU 0000.0000.0000.0003 AFSR 0100.0000.0000.0000 SCE
AFAR 0000.07c6.0000.1000
SC Alert: Host System has Reset
It happen 4 or 5 times and get the same error every time.I... (8 Replies)
Discussion started by: girish.batra
8 Replies
2. Shell Programming and Scripting
Hi All,
Sorry to post these many questions on UNIX. i am new to unix & got only UNIX work in my organization.
I need to make a script for File Arrival Check.
1. The script should wait for indicator file for configured amount of time.
2. If the file is not received after the configured... (4 Replies)
Discussion started by: Amit.Sagpariya
4 Replies
3. AIX
1) when user login to the server the session got colosed. How will resolve?
2) While firing the command ls -l we are not able to see the any files in the director. but over all view the file system using the command df -g it is showing 91% used. what will be the problem?
Thanks in advance. (1 Reply)
Discussion started by: pernasivam
1 Replies
4. AIX
Dear ALL.
I installed AIX OS on customer sites.
but Only one site is too slow when I connected telnet, ftp..
Ping is too fast. but telnet and FTP is not connected..
of course i check the configuration file on aix but it's normal.
Do any Idea??
thanks in advance.
- Jun - (3 Replies)
Discussion started by: Jeon Jun Seok
3 Replies
5. Shell Programming and Scripting
Hi,
A ------> B ------> C
I have a scenario where each day, my server B would ftp to server A and pull (A,B,C,D,E) from a specific directory.
Server C would need files (B,D) only when server B finished receiving from server A. These files change everyday, so sometimes it takes longer... (3 Replies)
Discussion started by: arex876
3 Replies
6. IP Networking
Hi,
This is rather a question from a "user" than from a sys admin, but I think this forum is apropriate for the question.
I have an adress with automatic email forwarding and for some senders (two hietherto), emails are bouncing. This has really created a lot of problems those two time so I... (0 Replies)
Discussion started by: carwe
0 Replies
7. UNIX for Dummies Questions & Answers
Hi Friends
iam using a filewatcher job which checks the path in intervals
below is the script
#!/bin/ksh
fileflag=0
timer1=0
check_interval=120 # check every 2 minutes
(( check_interval_minutes=${check_interval}/60 ))
while
do
if
then
echo "My file exists now..." | mailx -s... (7 Replies)
Discussion started by: robertbrown624
7 Replies
8. Shell Programming and Scripting
Hi,
I have a requirement wherein i need to have a generic file watcher in place.
On presence of a file in a particular directory,the file watcher should identify the related config file and execute the series of the shell scripts mentioned in the config file.
eg.Config file
a.sh
b.sh... (7 Replies)
Discussion started by: dikesm
7 Replies
9. Shell Programming and Scripting
hi All,
I ned to write a filewatcher script, with following requirements.
1. The script should look for the file in every 5 min.
2. If the file is found, it should check in every 3 min the size of file.
3. if the file size has not changed in last 4 iterations (i.e. in last 12 min), the... (2 Replies)
Discussion started by: alok2082
2 Replies
10. UNIX for Dummies Questions & Answers
I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore.
Here is what 's happening:
* I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies
faxq(1) mgetty+sendfax manual faxq(1)
NAME
faxq - display fax jobs queued by faxspool(1)
SYNOPSIS
faxq [<command>] [-osa] [-v] [-r] [-P<job><prio>]
DESCRIPTION
Display the fax queue set up by faxspool(1).
faxq looks for all the jobs queued by faxspool(1) to /var/spool/fax/outgoing/*. For each job in the queue, faxq displays some status infor-
mations about it. If no options are specified, one line per queued fax job is printed, displaying the job number, sender, number of pages
and target fax number.
COMMANDS
faxq stop stops the fax queue processing by creating the file /var/spool/fax/outgoing/stop. This command works only if you have write
access to the spool directory. Depending on local setup, this means ``root only'' or ``fax administrator group''. If you don't have write
access, an error message is printed.
faxq start re-starts a previously stopped fax queue, by removing the ``stop'' file. As for faxq stop this only works if you have write
access.
OPTIONS
-v Tells faxq to print a more verbose report for each job (multiple lines).
-o Show old jobs, already sent but still in the queue directory, too.
-s Show suspended jobs (stopped because of too many fatal errors during sending). You can restart those jobs with faxq -r
-a Show all jobs (active, old, suspended).
-r Restart suspended jobs. Every suspended job in the queue (that you have write permissions for) will be requeued. Use faxrm to
delete jobs that you do not want to be sent!
-P <job> <prio>
Change the priority of fax job <job> to <prio>. Example: "faxq -P F000247 3".
BUGS
faxq doesn't handle time scheduling yet.
faxq -P is currently broken (needs re-implementing with faxq-helper).
SEE ALSO
faxrunq(1), faxspool(1), faxrm(1), faxqueue(5)
AUTHOR
faxq is Copyright (C) 1993 by Gert Doering, <gert@greenie.muc.de>.
greenie 27 Oct 93 faxq(1)