diff --git a/gluon/scheduler.py b/gluon/scheduler.py index a68152b58..e758c3792 100644 --- a/gluon/scheduler.py +++ b/gluon/scheduler.py @@ -477,7 +477,8 @@ def write(self, data): # Get controller-specific subdirectory if task.app is of # form 'app/controller' (a, c, f) = parse_path_info(task.app) - _env = env(a=a, c=c, import_models=True) + _env = env(a=a, c=c, import_models=True, + extra_request={'is_scheduler': True}) logging.getLogger().setLevel(level) f = task.function functions = current._scheduler.tasks