Difference between revisions of "Module Scheduled jobs"

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search
m
Tag: 2017 source edit
(Add Chinese)
Tag: 2017 source edit
 
(7 intermediate revisions by one other user not shown)
Line 2: Line 2:
 
<!-- You can edit this section but do NOT remove these comments
 
<!-- You can edit this section but do NOT remove these comments
 
     Links below will be automatically replicated on translated pages by PolyglotBot -->
 
     Links below will be automatically replicated on translated pages by PolyglotBot -->
 +
[[zh:计划任务模块]]
 
<!-- END interlang links -->
 
<!-- END interlang links -->
  
Line 26: Line 27:
  
  
== Setup screen ==
+
== Module Setup ==
 
[[File:Module Scheduled Job setup EN.png|thumb]]
 
[[File:Module Scheduled Job setup EN.png|thumb]]
 
The only parameter that can be changed is the Security key used on the URL to launch cron jobs.
 
The only parameter that can be changed is the Security key used on the URL to launch cron jobs.
Line 34: Line 35:
 
* The URL to check and launch qualified cron jobs: http://mydolibarradress/htdocs/public/cron/cron_run_jobs.php?securitykey=xxxxxxxxxxxxxxxxxxxxxxxx&userlogin=admin
 
* The URL to check and launch qualified cron jobs: http://mydolibarradress/htdocs/public/cron/cron_run_jobs.php?securitykey=xxxxxxxxxxxxxxxxxxxxxxxx&userlogin=admin
 
* The URL to check and launch a specific job by its job id : http://mydolibarradress/htdocs/public/cron/cron_run_jobs.php?securitykey=xxxxxxxxxxxxxxxxxxxxxxxx&userlogin=admin&id=cronjobid
 
* The URL to check and launch a specific job by its job id : http://mydolibarradress/htdocs/public/cron/cron_run_jobs.php?securitykey=xxxxxxxxxxxxxxxxxxxxxxxx&userlogin=admin&id=cronjobid
 +
 +
== External activation of the module ==
 +
The module need to be externally activated each 5 minutes.
 +
 +
Depending on the environment where Dolibarr is running, the procedure to be followed is different.
 +
 +
=== Unix Environment ===
 +
On Unix environment you should use the crontab entry to run the command line each 5 minutes
 +
 +
=== Windows Environment ===
 +
On Windows, you have to create a new task in the Windows Task Scheduler.
 +
 +
* '''General''': don't forget to check "Run with maximum permissions".
 +
* '''Trigger''': Choose according to the use of your PC
 +
* '''Action''':
 +
Select "Start a program".
 +
Then put in Program/Script: C:\wamp64\bin\php7.3.12\php.exe
 +
And in Add arguments: -f C:\wamp64\wwww\dolibarr\scripts\cron\cron_run_jobs.php xxxxxxxxxxxxxxxx admin
 +
 +
With 'xxxxxxxxxxxxxxxx' is the security key that you will find in the parameters of the scheduled jobs module, and 'admin' is the name of your session.
 +
 +
The path indicated may be different depending on the installation and software version.
 +
This task will execute a command in windows to execute the php, then launch the planned work in progress of dolibarr
 +
 +
=== Dolibarr available on Internet ===
 +
You can use external services like :
 +
* https://webcron.dolizen.fr/
 +
* https://cron-job.org/en/
 +
 +
= Manage the Scheduled jobs =
 +
[[File:Module Schedule Job List EN.png|thumb]]
 +
In '''Home - Admin tools - Scheduled jobs''' you will find the list of active jobs and the last activation time.
 +
 +
You can also create new jobs.

Latest revision as of 01:33, 6 September 2023

Scheduled Jobs
Numero/ID of module 2300
User doc. of module This page
Developer doc. of module Module Scheduled Jobs (developer)

Introduction

The Scheduled Jobs Module is a core Dolibarr module. It is optional and part of the System group in module list.

The main purpose of the module is to manage the scheduled jobs (alias cron or chrono table)

Installation

This module is included with the Dolibarr distribution, so there is no need to install it.

Setup

Scheduled Jobs Module Activation EN.png

To use this module, you must first enable it using an administrator account, via the menu option "Home - Setup - Modules".

Choose the tab where the module is listed. Then click on "Activate".

The module is now activated.

If a cog icon appears Cog circle.svg on module thumb or at end of the line of the module, click on it to access the setup page specific to the module.


Module Setup

Module Scheduled Job setup EN.png

The only parameter that can be changed is the Security key used on the URL to launch cron jobs.

Below there is linked to :

External activation of the module

The module need to be externally activated each 5 minutes.

Depending on the environment where Dolibarr is running, the procedure to be followed is different.

Unix Environment

On Unix environment you should use the crontab entry to run the command line each 5 minutes

Windows Environment

On Windows, you have to create a new task in the Windows Task Scheduler.

  • General: don't forget to check "Run with maximum permissions".
  • Trigger: Choose according to the use of your PC
  • Action:

Select "Start a program". Then put in Program/Script: C:\wamp64\bin\php7.3.12\php.exe And in Add arguments: -f C:\wamp64\wwww\dolibarr\scripts\cron\cron_run_jobs.php xxxxxxxxxxxxxxxx admin

With 'xxxxxxxxxxxxxxxx' is the security key that you will find in the parameters of the scheduled jobs module, and 'admin' is the name of your session.

The path indicated may be different depending on the installation and software version. This task will execute a command in windows to execute the php, then launch the planned work in progress of dolibarr

Dolibarr available on Internet

You can use external services like :

Manage the Scheduled jobs

Module Schedule Job List EN.png

In Home - Admin tools - Scheduled jobs you will find the list of active jobs and the last activation time.

You can also create new jobs.