 <p>There is a dedicated option for that in the queue configuration. You can set a "Prolog" or "Epilog" script that will be executed before and after the job respectively. See <code>man queue_conf</code> or <a href="http://gridscheduler.sourceforge.net/htmlman/htmlman5/queue_conf.html" rel="nofollow">http://gridscheduler.sourceforge.net/htmlman/htmlman5/queue_conf.html</a>.</p>