This manual is deprecated. Please visit https://groupoffice.readthedocs.io for the latest documentation.

Difference between revisions of "Cron user manual"

From Group-Office Groupware and CRM Documentation
Jump to: navigation, search
(Created page with "=Overview= The Cron (Manage system tasks) module is used to administer the tasks that the system needs to do at given times. You can schedule tasks that need to run on the given...")
 
(Troubleshooting)
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
=Overview=
 
=Overview=
 +
[[File:Cron menu.png|200px|right|thumb]]
 
The Cron (Manage system tasks) module is used to administer the tasks that the system needs to do at given times.
 
The Cron (Manage system tasks) module is used to administer the tasks that the system needs to do at given times.
  
Line 7: Line 8:
 
The Email Reminders task.  
 
The Email Reminders task.  
 
This task checks if a user has reminders every 5 minutes.
 
This task checks if a user has reminders every 5 minutes.
 +
 +
<br clear=all>
  
 
=Planned system tasks list=
 
=Planned system tasks list=
[[File:Cron tasks-grid.png|800px|right|thumb]]
+
[[File:Cron tasks-grid.png|400px|right|thumb]]
 
This is the list of all tasks that are planned for your Group-Office installation.
 
This is the list of all tasks that are planned for your Group-Office installation.
  
 
The red ones will not be executed because they are disabled.
 
The red ones will not be executed because they are disabled.
 +
 
The green ones will be executed on the "Next run" time.
 
The green ones will be executed on the "Next run" time.
  
Line 18: Line 22:
  
 
=Job dialog=
 
=Job dialog=
[[File:Cron job-dialog-enabled.png|300px|right|thumb]]
+
[[File:Cron job-dialog-enabled.png|200px|right|thumb]]
 +
[[File:Cron job-dialog-disabled.png|200px|right|thumb]]
 
In the job dialog you can create new jobs and you can update existing ones.
 
In the job dialog you can create new jobs and you can update existing ones.
[[File:Cron job-dialog-disabled.png|300px|right|thumb]]
+
 
<br clear=all>
+
 
 +
<b>Name</b> : A unique name for the task you are creating/updating
 +
 
 +
<b>Job</b> : Here you can select the job that needs to be executed (These are PHP files that will be called)
 +
 
 +
<b>Minutes</b> : On which minutes of an hour needs the job be executed. Use "0-59" or "*" for every minute. You can also use "/5" for every 5 minutes.
 +
 
 +
<b>Hours</b> : On which hours of the day needs the job be executed. Use "0-23" or "*" for every hour. You can also use "/5" for every 5 hours.
 +
 
 +
<b>Monthdays</b> : On which month day needs the job be executed. Use "1-31" or "*" for every day. You can also use "/5" for every 5 days.
 +
 
 +
<b>Months</b> : On which month needs the job be executed. Use "1-12" or "*" for every month. You can also use "/5" for every 5 months.
 +
 
 +
<b>Weekdays</b> : On which day in the week needs the job be executed. Use "0-6" or "*" for every day.
 +
 
 +
<b>Enabled</b> : If this is checked then the job will be called on the given times.
 +
 
 +
<b>Run only once</b> : If you check this then the job will be called only once on the given time. After that the job will be automatically disabled.
 +
 
 +
<hr>
 +
 
 +
When you select a Job then it is possible that the users and groups tab will be enabled.
 +
 
 +
If that is the case then you can select users and groups for which the cron job will be executed.
 +
 
 +
The cron job will then be executed for every user/group that you have selected for it.
 +
 
 +
 
 +
This option will not be available for every cron job.
 +
<br clear=all> :
 +
 
 +
=Troubleshooting=
 +
If the cron module is installed and you have enabled some jobs for it and you found out that the jobs are not executed then you need to check if the server(system) cron deamon (Crontab) is calling the Group-Office cron controller every minute.
 +
 
 +
On ubuntu systems you can check that by going to the folder:
 +
<pre>/etc/cron.d/</pre>
 +
 
 +
In that folder you should find the file:
 +
<pre>groupoffice-cron</pre>
 +
 
 +
If the file does not exist then you need to create it and add the following code into it:
 +
<pre>* * * * * www-data php /usr/share/groupoffice/groupofficecli.php -r=core/cron/run -c=/etc/groupoffice/config.php > /dev/null</pre>
 +
 
 +
 
 +
On windows it should be something like:
 +
 
 +
<pre>c:\php\php-win.exe -c c:\path\to\php.ini -f c:\path\to\groupofficecli.php -- -c=c:\path\to\config.php -- -r=core/cron/run -- -q</pre>

Latest revision as of 08:51, 3 June 2014

Overview

Cron menu.png

The Cron (Manage system tasks) module is used to administer the tasks that the system needs to do at given times.

You can schedule tasks that need to run on the given times. There is one tasks already set by default in the module.

The Email Reminders task. This task checks if a user has reminders every 5 minutes.


Planned system tasks list

Cron tasks-grid.png

This is the list of all tasks that are planned for your Group-Office installation.

The red ones will not be executed because they are disabled.

The green ones will be executed on the "Next run" time.


Job dialog

Cron job-dialog-enabled.png
Cron job-dialog-disabled.png

In the job dialog you can create new jobs and you can update existing ones.


Name : A unique name for the task you are creating/updating

Job : Here you can select the job that needs to be executed (These are PHP files that will be called)

Minutes : On which minutes of an hour needs the job be executed. Use "0-59" or "*" for every minute. You can also use "/5" for every 5 minutes.

Hours : On which hours of the day needs the job be executed. Use "0-23" or "*" for every hour. You can also use "/5" for every 5 hours.

Monthdays : On which month day needs the job be executed. Use "1-31" or "*" for every day. You can also use "/5" for every 5 days.

Months : On which month needs the job be executed. Use "1-12" or "*" for every month. You can also use "/5" for every 5 months.

Weekdays : On which day in the week needs the job be executed. Use "0-6" or "*" for every day.

Enabled : If this is checked then the job will be called on the given times.

Run only once : If you check this then the job will be called only once on the given time. After that the job will be automatically disabled.


When you select a Job then it is possible that the users and groups tab will be enabled.

If that is the case then you can select users and groups for which the cron job will be executed.

The cron job will then be executed for every user/group that you have selected for it.


This option will not be available for every cron job.
 :

Troubleshooting

If the cron module is installed and you have enabled some jobs for it and you found out that the jobs are not executed then you need to check if the server(system) cron deamon (Crontab) is calling the Group-Office cron controller every minute.

On ubuntu systems you can check that by going to the folder:

/etc/cron.d/

In that folder you should find the file:

groupoffice-cron

If the file does not exist then you need to create it and add the following code into it:

* * * * * www-data php /usr/share/groupoffice/groupofficecli.php -r=core/cron/run -c=/etc/groupoffice/config.php > /dev/null


On windows it should be something like:

c:\php\php-win.exe -c c:\path\to\php.ini -f c:\path\to\groupofficecli.php -- -c=c:\path\to\config.php -- -r=core/cron/run -- -q