Changes between Version 3 and Version 4 of RemoteJobs


Ignore:
Timestamp:
Jun 18, 2011, 7:17:23 AM (13 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RemoteJobs

    v3 v4  
    2020== Describing a batch ==
    2121
    22 A single job is described by
     22A job is described by
    2323{{{
    2424<job>
     
    2828</job>
    2929}}}
    30 C and F are macro-substituted for sweep variables: see below.
    3130
    3231Each input file is specified by either a URL accessible to the server,
    3332or by a path on the server.
    34 
    35 A parameter sweep is described by
    36 {{{
    37 <sweep var=foo start=x end=y inc=z>
    38    [<job>...<job>] or [<sweep>...<sweep>]
    39 </sweep>
    40 }}}
    41 
    42 In the body of the sweep,
    43 the string "foo" is macro-substituted with values from x to y with increment z.
    44 
    45 Sweeps may be nested.
    4633
    4734A batch of jobs is described by:
     
    5138   [<input_template>x</input_template>]
    5239   [<output_template>x</output_template>]
    53    [<job>...<job>] or [<sweep>...<sweep>]
     40   <job>...</job>
     41   ... more jobs
    5442</batch>
    5543}}}
     
    160148}}}
    161149
     150== Example usage ==
     151PHP:
     152
     153{{{
     154$ch = curl_init("http://project.edu/job_control.php");
     155curl_setopt($ch, CURLOPT_POST, 1);
     156curl_setopt($ch, CURL_POSTFIELDS, "
     157   <batch_estimate>
     158      <batch>
     159         <app>myappname</app>
     160         <job>
     161             <command_line>--t ALPHA</command_line>
     162         </job>
     163      </batch>
     164   </batch_estimate>
     165");
     166$reply = curl_exec($ch);
     167$r = new SimpleXMLElement($reply);
     168curl_close($ch);
     169
     170if ($r->estimate) {
     171   echo "Estimate: $r->estimate->seconds seconds\n";
     172} else {
     173   echo "Error: $r->error->message\n";
     174}
     175 
     176
    162177== Implementation notes ==
    163178