All Elements
ELEMENT: <job>
The
<job>
tag can be used to define multiple jobs in a single .wsf file. A job can be uniquely identified by its
id
attribute. When there are multiple jobs in a .wsf file, only the job that is declared first is executed during script execution. To execute a job that is not declared first in the .wsf file, one must use the //Job:strID option to invoke the script.
Syntax:
<job id="JobID"> ... </job>
Attribute: id
The optional
id
attribute can be used to give a unique identifier to the job.
The following sample code illustrates the use of this tag.
<?XML version="1.0" ?>
<!-- Filename: demo.wsf-->
<package>
<job>
<script language="VBScript">
WScript.Echo "Hello."
</script>
</job>
<job id="SayGoodbye">
<script language="VBScript">
WScript.Echo "Good bye."
</script>
</job>
</package>
Output:
wscript demo.wsf displays "Hello."
wscript //Job:SayGoodBye demo.wsf displays "Good bye."
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information