Schedulers in OpenERP
Schedulers are one of the most attractive features of OpenERP. As the name implies they can schedule any activity like sending email, checking stock quantity, synchronizations, invoice and purcahse operations, etc... A scheduler executes a particular function at regular intervals, without human interference.
In Open ERP you can find schedulers at "Administration>Configuration>Scheduler>Scheduled Actions". scheduler belongs to the openerp model "ir.cron". Here is, how we define a scheduler in xml (Figure 1.1)
Figure 1.1
"scheduler_id" : is a unique xml record id
"scheduler_name" : any desirable name
"active" : True or False determines whether the scheduler is active or not..
"user_id" : refers the user who owns the scheduler
"interval_number" : number of times the scheduler is to be called based on the "interval_type"
"interval_type" : it can be days, hours, minututes etc
"numbercall" : Number of time the function is called. negative number indicates no limit
"doall" : booelan field. A 'True' enables it to execute missed occurences as soon as the server is restarts
"model" : Name of object whose function will be called when this scheduler will run. e.g. 'res.partener'
"function" : Name of the method to be called on the object when this scheduler is executed.
"args" : Arguments to be passed to the method. e.g. (uid,)
Here is an example (figure 1.2)
Figure 1.2
The foillowing figures (figure 1.3 and figure 1.4) show the corresponding view in GTK Client
Figure 1.3
Figure 1.4
It's weird that your XML
It's weird that your XML examples are images; why not use the code formatting facility?
Is the 'arguments' parameter called 'arguments' or 'args'? Any comments on what's valid for this?
Based on OpenERP 7, the
Based on OpenERP 7, the 'arguments' parameter should be 'args' for both.
See: 'openerp/addons/base/ir/osv_memory_autovacuum.xml' under your openerp installation folder.