SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
file watch

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
file watch
Author Message
Robert Balsamo



Joined: 11 Jan 2002
Posts: 9

Post file watch Reply with quote

When using file watch, do I need to check box(Restart this job if fails). My job becomes disabled when trying to open file. Attached is partial script. I receive an error on the first FileOpen. Thanks _ Robert

FileOpen "d:/ftp/ftpservice/users/S10434_L001/nwlnbsu.txt", "StreamMode", "Read", True, file_handle
LoopUntil file_handle, end_loop

// check if we are waiting already too long (more than 10 minutes)

IsGreater wait_time, 600, timeout

IfThen timeout, timeout

// Notify Production Control

MailSend "ftpservice@efg.net", "appolo2", "rbalsamo@efg.net", &

"File watch job failed", "Giving up while waiting for nwlnbsu.txt"

Exit

TIMEOUT:
// wait 30 seconds then try again

Wait 30

Add wait_time, 30, wait_time

// try opening file

FileOpen "d:\ftp\ftpservice\users\s10434_l001\nwlnbsu.txt", "StreamMode", "Read", true, file_handle
END_LOOP:

// Release file
FileClose file_handle

Mon Apr 15, 2002 7:55 am View user's profile Send private message
SysOpen



Joined: 15 Apr 2002
Posts: 1

Post Re: file watch Reply with quote

Check "Ignore Errors" option for this job.

The error you get can be caused by the following line if you use "\" as the default escape symbol for special ASCII characters

FileOpen "d:\ftp\ftpservice\users\s10434_l001\nwlnbsu.txt", ....

Change it to
FileOpen "d:\\ftp\\ftpservice\\users\\s10434_l001\\nwlnbsu.txt", ...

If you run 24x7 version 3 you can also use OnErrorResumeNext, OnErrorStop and onErrorGoTo statements to deal with the file open error.

: When using file watch, do I need to check box(Restart this job if fails). My
: job becomes disabled when trying to open file. Attached is partial script.
: I receive an error on the first FileOpen. Thanks _ Robert

: FileOpen "d:/ftp/ftpservice/users/S10434_L001/nwlnbsu.txt",
: "StreamMode", "Read", True, file_handle
: LoopUntil file_handle, end_loop

: // check if we are waiting already too long (more than 10 minutes)

: IsGreater wait_time, 600, timeout

: IfThen timeout, timeout

: // Notify Production Control

: MailSend "ftpservice@efg.net", "appolo2",
: "rbalsamo@efg.net", &

: "File watch job failed", "Giving up while waiting for
: nwlnbsu.txt"

: Exit

: TIMEOUT: // wait 30 seconds then try again

: Wait 30

: Add wait_time, 30, wait_time

: // try opening file

: FileOpen "d:\ftp\ftpservice\users\s10434_l001\nwlnbsu.txt",
: "StreamMode", "Read", true, file_handle
: END_LOOP: // Release file
: FileClose file_handle

Mon Apr 15, 2002 9:10 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.