Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help! With ending a procomm session.

Status
Not open for further replies.

papollo

Programmer
Oct 19, 2001
71
0
0
US
Hello:

I am having trouble with the script below.
What I want to do is:
1. End the script below at 8:59am every day.
2. Start another script at 9am via the window scheduler.
3. Start the script below at 9:15am via a window scheduler

The problem is that once this script ends, and I restart it, the script ends.
I ran debug with breakpoints and it does not matter what the values of iHours and iMin are. The script thinks they are equal to 8:58.

I am stumped!!

Any ideas?
________________________________________________________
proc main
string HostPath

integer iYear, iMonth, iDay, iHour, iMin, iSec
while 1
ltimeints $LTIME iYear iMonth iDay iHour iMin iSec
if iHour = 8

if iMin = 58
pwexit
endif
endif

fetch ASPECT PATH HostPath
addfilename HostPath "HOST\_HOST"
execute HostPath
endwhile
endproc
 
You need to change the equals signs to double equals sign (==). The single equals sign causes the variable to be assigned the value you are testing for, which makes that statement true. The double equals will cause the comparison to be made without the assignment.


aspect@aspectscripting.com
 
knob:

I'll try that.
Thank you very much
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top