示例#1
0
        def get(rsrc_id):
            """Get cron job configuration."""
            job = cron.get_job(_scheduler(), rsrc_id)
            _LOGGER.debug('job: %r', job)

            if job is None:
                return job

            return cron.job_to_dict(job)
示例#2
0
        def delete(rsrc_id):
            """Delete configured cron job."""
            _LOGGER.info('delete: %s', rsrc_id)

            job = cron.get_job(_scheduler(), rsrc_id)
            _LOGGER.debug('job: %r', job)

            if job:
                _LOGGER.info('Removing job %s', rsrc_id)
                job.remove()
示例#3
0
        def get(rsrc_id):
            """Get instance configuration."""
            job = cron.get_job(scheduler(), rsrc_id)
            _LOGGER.debug('job: %r', job)

            return cron.job_to_dict(job)