#!/bin/sh
#
# Cancel script example for GridSolve
#
# Arguments:  GridSolve will pass one argument to the cancel
# script, which is the identifier of the job to kill.
#
# GridSolve cancel scripts should exit with the appropriate
# status as follows:
#
#   0 - the job was successfully killed
#   1 - failed to kill the job
#
# $Id: gs_mscc_cancel,v 1.1 2006/10/26 20:21:19 yarkhan Exp $

# Export the jobid so that is can be accessed from the cmd shell
export GRIDSOLVE_JOBID=$1

# Do a job cancel cmd 
cmd /c job cancel /scheduler:ms-hn %GRIDSOLVE_JOBID% > job_cancel_output

# Return a success
# TODO This needs to be fixed to check the job_cancel_output file
exit 0
