Save jobid in variable by saving to file temporarily
Saves the jobid to a variable which in turn in saved to the reconnect file. This allows for easier cleanup by killing of the job later.
I don't know how to save it in a variable directly so I saved it to a file temporarily.
Edited by sfux