Skip to content
Snippets Groups Projects
Commit 19c00ad8 authored by David Verelst's avatar David Verelst
Browse files

launch.py: fix bug from previous commit, write cronjob when in crontab mode

parent 2d09626a
No related branches found
No related tags found
No related merge requests found
...@@ -643,7 +643,7 @@ class Scheduler: ...@@ -643,7 +643,7 @@ class Scheduler:
print self.path_pbs_files print self.path_pbs_files
print "I have no choice but to abort the launch sequence." print "I have no choice but to abort the launch sequence."
print "" print ""
return return 'nothing'
time0 = 0.0 time0 = 0.0
while True: while True:
...@@ -705,7 +705,7 @@ class Scheduler: ...@@ -705,7 +705,7 @@ class Scheduler:
ii += 1 ii += 1
elif crontab_mode: elif crontab_mode:
save_pbsflist(self.f_pbsflist, pbsflist[ii:]) save_pbsflist(self.f_pbsflist, pbsflist[ii:])
return return 'crontab'
else: else:
# wait a bit before trying to launch a job again # wait a bit before trying to launch a job again
if self.debug: if self.debug:
...@@ -723,7 +723,7 @@ class Scheduler: ...@@ -723,7 +723,7 @@ class Scheduler:
print 'All jobs have been launched, stopping the scheduler.' print 'All jobs have been launched, stopping the scheduler.'
if crontab_mode: if crontab_mode:
remove_crontab() remove_crontab()
return return 'done'
def launch_deps(self): def launch_deps(self):
"""Launch """Launch
...@@ -994,8 +994,8 @@ if __name__ == '__main__': ...@@ -994,8 +994,8 @@ if __name__ == '__main__':
else: else:
ss.write_config() ss.write_config()
ss.init_state_log() 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 # start crontab job after first round of launching to prevent it from
# running more than once # running more than once
if options.crontab: if options.crontab and status == 'crontab':
write_crontab(every_min=options.every_min) write_crontab(every_min=options.every_min)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment