@Inject
    public void schedule( Scheduler scheduler )
        throws Exception
    {
        if ( cronExpression == null && trigger == null )
        {
            throw new ProvisionException( format( "Impossible to schedule Job '%s' without cron expression",
                                                  jobClass.getName() ) );
        }
        if ( cronExpression != null && trigger != null )
        {
          throw new ProvisionException( format( "Impossible to schedule Job '%s' with cron expression " +
                                                "and an associated Trigger at the same time", jobClass.getName() ) );
        }

        JobKey jobKey = jobKey( DEFAULT.equals( jobName ) ? jobClass.getName() : jobName, jobGroup );
        TriggerKey triggerKey = triggerKey( DEFAULT.equals( triggerName ) ? jobClass.getCanonicalName() : triggerName, triggerGroup );

        if ( updateExistingTrigger && scheduler.checkExists( triggerKey ) ) {
            scheduler.unscheduleJob( triggerKey );
        }

        scheduler.scheduleJob( newJob( jobClass )
                               .withIdentity( jobKey )
                               .requestRecovery( requestRecovery )
                               .storeDurably( storeDurably ).build(),
                               ( trigger == null ) ?
                               newTrigger()
                               .withIdentity( triggerKey )
                               .withSchedule( cronSchedule( cronExpression )
                                              .inTimeZone( timeZone ) )
                                              .withPriority( priority )
                                              .build()
                                : trigger);
    }