You can use the STAF DELAY service which lets you delay for a specified 
time period.  See the STAF User's Guide for more information on the DELAY 
service.  For example, to delay 10 seconds, the STAF command would be:

  STAF local DELAY DELAY 10s

Here's an example using a <stafcmd> element in a STAX job to delay 10 
seconds.  You could set the delayTime variable to be another valid time 
period:

<script>
  # Delay 10 seconds (if wanted to delay 1 minute you could specify 1m or 
60s)
  delayTime = '10s'
</script>

<stafcmd name="'Delay %s'">
  <location>'local'</location>
  <service>'DELAY'</service>
  <request>'DELAY %s' % (delayTime)</request>
</stafcmd>

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   "Raja Narayanan" <v_rajnara...@rediffmail.com>
To:     "staf-users" <staf-users@lists.sourceforge.net>
Date:   02/24/2011 10:10 AM
Subject:        [staf-users] STAX - How to introduce time delay before 
running two process



Staf users,

I'm trying to launch two process, One after another with a specified time 
delay.
how to introduce time delay?

Thanks,
V Raja

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT 
data 
generated by your applications, servers and devices whether physical, 
virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to