diff --git a/launch.py b/launch.py index 94a915d7843e35f03cbe5a5d77c2c85a7c5c6f2d..2c395f170dd3b7a1841f9b125b024d1a6b307a62 100755 --- a/launch.py +++ b/launch.py @@ -643,7 +643,7 @@ class Scheduler: print self.path_pbs_files print "I have no choice but to abort the launch sequence." print "" - return + return 'nothing' time0 = 0.0 while True: @@ -705,7 +705,7 @@ class Scheduler: ii += 1 elif crontab_mode: save_pbsflist(self.f_pbsflist, pbsflist[ii:]) - return + return 'crontab' else: # wait a bit before trying to launch a job again if self.debug: @@ -723,7 +723,7 @@ class Scheduler: print 'All jobs have been launched, stopping the scheduler.' if crontab_mode: remove_crontab() - return + return 'done' def launch_deps(self): """Launch @@ -994,8 +994,8 @@ if __name__ == '__main__': else: ss.write_config() ss.init_state_log() - ss(depend=options.depend, crontab_mode=options.crontab) + status = ss(depend=options.depend, crontab_mode=options.crontab) # start crontab job after first round of launching to prevent it from # running more than once - if options.crontab: + if options.crontab and status == 'crontab': write_crontab(every_min=options.every_min)