There must be a session to the infobase which will perform background jobs. In Server mode it is created by the 1C:Enterprise server, but in File mode it must be runned manually (or using any automation scripts). This session should check for background jobs to perform by the schedule and perform ones which should to. Here is the code which must be implemented in the Managed application module, which should execute background jobs in File mode:
Code |
---|
Procedure OnStart(Cancel)
If SystemSettingsServerCall.CurrentUserRunsBackgroundJobs() Then
IdleHandler();
BackgroundJobsReady = True;
AttachIdleHandler("IdleHandler", 2);
EndIf;
EndProcedure
Procedure IdleHandler() Export
ProcessJobs(1);
EndProcedure |