Improve delayed job script