fixed cron
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 2.1.0 (2012-10-11 09:23:31) dev
|
||||
Version 2.1.0 (2012-10-11 16:48:00) dev
|
||||
|
||||
@@ -314,22 +314,26 @@ def crondance(applications_parent, ctype='soft', startup=False, apps=None):
|
||||
(action,models,command) = (True,'-M',command[1:])
|
||||
else:
|
||||
action=False
|
||||
|
||||
if action and command.endswith('.py'):
|
||||
commands.extend(('-J', # cron job
|
||||
models, # import models?
|
||||
'-S', app, # app name
|
||||
'-a', '"<recycle>"', # password
|
||||
'-R', command)) # command
|
||||
shell = True
|
||||
elif action:
|
||||
commands.extend(('-J', # cron job
|
||||
models, # import models?
|
||||
'-S', app+'/'+command, # app name
|
||||
'-a', '"<recycle>"')) # password
|
||||
shell = True
|
||||
else:
|
||||
commands = command
|
||||
shell = False
|
||||
|
||||
# from python docs:
|
||||
# You do not need shell=True to run a batch file or
|
||||
# console-based executable.
|
||||
shell = False
|
||||
|
||||
try:
|
||||
cronlauncher(commands, shell=shell).start()
|
||||
except Exception, e:
|
||||
|
||||
Reference in New Issue
Block a user