write pid of job to file
keep link parameter when redirecting to CAS