SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
How to get current time after running the job

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
How to get current time after running the job
Author Message
felixc



Joined: 24 Sep 2007
Posts: 20
Country: Hong Kong

Post How to get current time after running the job Reply with quote
Hi,

I want to send an email informing the finish of a time consuming job. My code runs like this
Code:

  RunAndWait("job", "", 0, ID)
  MailSend("user ID", "", "someone", "Job finished at @T"HH\:MM\:SS"", "some message")


When I got the email, I found that the time in subject is the starting time of job, not finishing time.

Anything wrong ?
Fri Oct 05, 2007 6:15 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7951

Post Reply with quote
That's right. All macro-variables are inserted before the job is run. Use date/time functions to obtain the current system date time values, as in example below

RunAndWait("job", "", 0, ID)

Code:
Use Now() to get the time
Dim( time_now, time )
Now( time_now )
Dim( my _message, string )
Concat( "Job finished at ", time_now, my_message )
MailSend("user ID", "", "someone", my_message, "some message")

Fri Oct 05, 2007 9:10 am 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.