I submit a PBS job for 02:00:00 hours. I need to create a file in the PBS working directory at a specified time t (say 01:30:00 hours) after the job has begun to ensure that the job terminates smoothly for any subsequent restart. For example something as follows

echo "LABORT" > file1.txt

I do not want to rely on PBS for the file creation through chaining jobs, since I want to create it exactly at the specified time. Is there a clean and automated way to achieve this while running many such jobs?

EDIT 1: I believe crontab can perform the task, but how to perform the following

  • monitor the jobs under a given username,
  • get the job start time and working directory
  • Add the time t to start time and Pass the modified
  • time and working directory to crontab
  • You probably want to look at PBS "hooks" which are python scripts run by PBS on events you specify. – Calimo Aug 28 '17 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.