diff --git a/VERSION b/VERSION index b63df445..c9901797 100644 --- a/VERSION +++ b/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 diff --git a/gluon/newcron.py b/gluon/newcron.py index a238b8a8..286503db 100644 --- a/gluon/newcron.py +++ b/gluon/newcron.py @@ -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', '""', # password '-R', command)) # command - shell = True elif action: commands.extend(('-J', # cron job models, # import models? '-S', app+'/'+command, # app name '-a', '""')) # 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: