Exemple #1
0
 def handle(self, *args, **options):
     app_name = None
     job_name = None
     if len(args)==1:
         job_name = args[0]
     elif len(args)==2:
         app_name, job_name = args
     if options.get('list_jobs'):
         print_jobs(only_scheduled=False, show_when=True, show_appname=True)
     else:
         if not job_name:
             print "Run a single maintenance job. Please specify the name of the job."
             return
         self.runjob(app_name, job_name, options)
 def handle(self, *args, **options):
     app_name = None
     job_name = None
     if len(args) == 1:
         job_name = args[0]
     elif len(args) == 2:
         app_name, job_name = args
     if options.get('list_jobs'):
         print_jobs(only_scheduled=False, show_when=True, show_appname=True)
     else:
         if not job_name:
             print "Run a single maintenance job. Please specify the name of the job."
             return
         self.runjob(app_name, job_name, options)
Exemple #3
0
 def handle(self, *args, **options):
     when = None
     if len(args)>1:
         self.usage_msg()
         return
     elif len(args)==1:
         if not args[0] in ['hourly', 'daily', 'weekly', 'monthly']:
             self.usage_msg()
             return
         else:
             when = args[0]
     if options.get('list_jobs'):
         print_jobs(when, only_scheduled=True, show_when=True, show_appname=True)
     else:
         if not when:
             self.usage_msg()
             return
         self.runjobs(when, options)
         self.runjobs_by_dispatcher(when, options)
Exemple #4
0
 def handle(self, *args, **options):
     when = None
     if len(args) > 1:
         self.usage_msg()
         return
     elif len(args) == 1:
         if not args[0] in ['hourly', 'daily', 'weekly', 'monthly']:
             self.usage_msg()
             return
         else:
             when = args[0]
     if options.get('list_jobs'):
         print_jobs(when,
                    only_scheduled=True,
                    show_when=True,
                    show_appname=True)
     else:
         if not when:
             self.usage_msg()
             return
         self.runjobs(when, options)
         self.runjobs_by_dispatcher(when, options)