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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Daily collection script using variable date

Status
Not open for further replies.

AK88

Technical User
Apr 2, 2002
3
US
Fairly new to using Procomm/Aspect. We have 20+ exchanges that we have to dial into daily on work days to collect maint notes from our switches. The data is stored on a data collection unit in each exchange. We use the Procomm scheduler to run the scripts after midnight on work days. Once the connection is made the scrip is run to select the start date/time and stop date/time of the data to be collected.
Currently we go into each script to change the start and stop date every day. With 20+ scripts it gets tedious. Is there a way of having the scrip refer to data outside of the script itself for the start and stop date? It would be great to increment but on Friday we have to select the current date for the start date and the date of the following Sunday to collect the data correctly. Any suggestions on the process, examples or other resources would be great.
 
I've got a few date scripts near the top of the samples page of my site that can likely get you started. Basically all you need to know is you can get the current date by using ltimeints to break down $LTIME (long value containing the number of seconds from some time in the past) and knowing that you can move a day forward by adding 86400 seconds per day. You can also use the integer variables to build the name of your capture file as I've illustrated in a couple of the scripts.

 
I used the info from thread448-1301392 to accomplish the changing of the start and stop month and date of our script. Unfortunately weekends and holidays move the stop month/date in the scripts from a set time span. All I do now is to update one script and all the other scripts refer to the Sx variable.
Next time I will do a little bit more research before the post.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top