Changes between Version 3 and Version 4 of RemoteJobs
- Timestamp:
- Jun 18, 2011, 7:17:23 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RemoteJobs
v3 v4 20 20 == Describing a batch == 21 21 22 A singlejob is described by22 A job is described by 23 23 {{{ 24 24 <job> … … 28 28 </job> 29 29 }}} 30 C and F are macro-substituted for sweep variables: see below.31 30 32 31 Each input file is specified by either a URL accessible to the server, 33 32 or by a path on the server. 34 35 A parameter sweep is described by36 {{{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.46 33 47 34 A batch of jobs is described by: … … 51 38 [<input_template>x</input_template>] 52 39 [<output_template>x</output_template>] 53 [<job>...<job>] or [<sweep>...<sweep>] 40 <job>...</job> 41 ... more jobs 54 42 </batch> 55 43 }}} … … 160 148 }}} 161 149 150 == Example usage == 151 PHP: 152 153 {{{ 154 $ch = curl_init("http://project.edu/job_control.php"); 155 curl_setopt($ch, CURLOPT_POST, 1); 156 curl_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); 168 curl_close($ch); 169 170 if ($r->estimate) { 171 echo "Estimate: $r->estimate->seconds seconds\n"; 172 } else { 173 echo "Error: $r->error->message\n"; 174 } 175 176 162 177 == Implementation notes == 163 178