Running scheduled jobs in File mode

Understanding basics of 1C:Enterprise platform. To start working with 1C:Enterprise platform visit Getting started page

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Jul 18, 2012
Company: Osaka University

Good evening!

I'm trying to run scheduled job in infobase created in File mode, but it does not start somewhy. Could someone explain why?

 
#2
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Jul 20, 2011
Company:

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

 
#3
People who like this:0Yes/0No
Timofey Bugaevsky
Guest

Joined:
Company:

You can see more detailed example in the Subsystems Library. There is Scheduled Jobs subsystem which contains ScheduledAndBackgroundJobs data processor and in ScheduledAndBackgroundJobs form there is OpenSeparateSessionOfScheduledJobsProcessing command which opens the separate session for processing background jobs. This is what you need, I believe.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.