Skip to main content

more options


Sample .bat Script

When your job starts, the script or program specified in the <run>...</run> tags will begin. It can be any script (e.g. perl, python, bat) or an executable. Commonly a script is used to handle file copy logistics and start the executable, then clean up after the job is done.

This example is a .bat script.

REM Create a clean local temp folder, T:\myuserid
call TDirCreate.bat 

REM Change the current working directory 
cd /d T:\%USERNAME% 

REM Copy executable and data files to the current working directory 
copy h:\users\%USERNAME%\quick.exe 

REM Run the program
quick.exe 1>quick.out2>quick.err

REM Copy results back to fileserver
copy /Y quick.* h:\users\%USERNAME%

REM Delete the local temp folder and everything in it
call TDirDelete.bat

REM Release the nodes and end the job
vsched -cancel

More XML and Script Examples

When your job starts, the script or program specified in the <run>...</run> tags will begin. It can be any script (e.g. perl, python, bat) or an executable. Commonly a script is used to handle file copy logistics and start the executable, then clean up after the job is done.

This example is a .bat script.

  1. set up a temporary directory on the compute node for your files
  2. copy the files your job needs to the temporary directory
  3. run your program(s)
  4. copy the output files back to the CTC fileservers
  5. delete your files in the temporary directory on the compute node
  6. end the batch session
REM Create a clean local temp folder, T:\myuserid
call TDirCreate.bat 

REM Change the current working directory 
cd /d T:\%USERNAME% 

REM Copy executable and data files to the current working directory 
copy h:\users\%USERNAME%\quick.exe 

REM Run the program
quick.exe 1>quick.out2>quick.err

REM Copy results back to fileserver
copy /Y quick.* h:\users\%USERNAME%

REM Delete the local temp folder and everything in it
call TDirDelete.bat

REM Release the nodes and end the job
vsched -cancel

More XML and Script Examples