Job
Updated
A job is a script in a model that runs on a cron schedule or on demand: a recalculation, a cleanup, an integration pull. The class is TaskScriptBase. The method is ExecuteAsync(TaskContext).
Note
MetaAgentis the job scheduler. Print agents arePrintAgent. Mixing the two looks like an empty printer catalog while jobs still run.
Files: Jobs/<Name>/<Name>.json (kind: Job, cronExpression, isActive, executeSingle) plus the script pair. The job window shows the run journal. JobsController requires Admin.
JobExecutor owns a scope per job, not per scheduler tick. TaskContext.GetService<T>() goes to DI, where model contracts are not. ScriptServices.Get<T>() / TryGet<T>() reaches them. The job is compiled in its own model's assemblies — CS0246 on I<Name> means the job is in the wrong model.
MetaJob.RunAsUserMetaId is the principal for the run. JobSchedulerService wraps in-process execution in that user, the same way a remote agent already did.
Text the job logs for a person is a resource, not a C# literal.
An after-install hook is not in the product. A first seed that must run on a tenant is a scheduled job.
Related kinds#
- Service
- Web service
- Data package — a job may apply a pack; there is no after-install hook
- Print form — not this scheduler
- Scripts