You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2012-01-05 19:30:14

Jon.Maxwell
Member
Registered: 2012-01-05
Posts: 3

Scheduled Task Not Working

For some reason, after the update of GLPI, my mail notifications do not work for created tickets anymore.
Incoming mail will not be created into a ticket automatically, and new ticket creation will not send a mail anymore.

I have it set to run every minute (for debugging sake) and the only way emails are created/tickets created if I trigger it manually through "execute" or browsing the pages.

The mail automated task does not happen automatically. The status of it is "as soon as possible" even if it is 5 minutes overdue. Why isn't it happening automatically?

I also have a cron job set up on my CentOS to run the front/cron.php file.
The task is usr/bin/php www/glpi/front/cron.php
Also, on that end, my cron task will not happen automatically either. It all works fine if I hit execute, but basically nothing is happening automatically.

Anyone else ever have these issues? Would it have to do with permissions?

Thanks,
Jon

Offline

#2 2012-01-05 19:33:20

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Scheduled Task Not Working

If you are using a system cron job, have you configured your tasks ro run in CLI mode ?


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#3 2012-01-05 22:11:47

Jon.Maxwell
Member
Registered: 2012-01-05
Posts: 3

Re: Scheduled Task Not Working

It was previously in GLPI mode. I set it to CLI to see if that made a difference, but it doesn't. I'm thinking it is a php issue. In the instructions to cron GLPI (theres a link on this website) It says that you should use php5. I don't have a php5 file. I did an update recently and removed the old versions of PHP for the new. I just have it pointing to usr/bin/php, not usr/bin/php5. Where can I obtain the php5 file?

I am running CentOS and I don't know what command to use to install to get the php5 file.

Offline

#4 2012-01-05 22:18:16

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Scheduled Task Not Working

under RH/centos, /usr/bin/php is fine (php5 is debian specific)

Which centos and php version ?


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#5 2012-01-05 23:02:16

Jon.Maxwell
Member
Registered: 2012-01-05
Posts: 3

Re: Scheduled Task Not Working

PHP Version 5.3.8
CentOS Linux 5.5
Also when I remotely manage the website I use Webmin 1.570.

Other websites on this server that use PHP are working fine, so I don't think I am missing anything.
Does the cron.php file need to be edited at all?

Offline

#6 2012-01-23 03:02:47

level6
Member
Registered: 2012-01-19
Posts: 11

Re: Scheduled Task Not Working

I am seeing the same behavior for the ocsng scheduled automatic action.  This is a brand new build on a brand new install of CentOS 6 w/ the latest PHP, MySQL, GLPI, OCS, etc.  The only difference is that I have never seen these jobs actually work automatically.  (:

I am not seeing anything in any logs I can find which hints at any error.

Raymond.


CentOS 6 - PHP 5.3.3-3.el6_2.5 - MySQL 5.1.47-4.el6 - OCS 2.0.3 - GLPI 0.80.61

Offline

#7 2012-01-23 03:07:21

level6
Member
Registered: 2012-01-19
Posts: 11

Re: Scheduled Task Not Working

Just replying again to give my version stats:

CentOS 6 - PHP 5.3.3-3.el6_2.5 - MySQL 5.1.47-4.el6 - OCS 2.0.3 - GLPI 0.80.61


CentOS 6 - PHP 5.3.3-3.el6_2.5 - MySQL 5.1.47-4.el6 - OCS 2.0.3 - GLPI 0.80.61

Offline

#8 2012-01-24 12:38:01

cr_bwi
Member
Registered: 2012-01-24
Posts: 2

Re: Scheduled Task Not Working

We have the same problem. Some tasks including receiving mails from the mail gateway are working only when trigerred manually.

SLES 11 - PHP 5.2.4 - MySQL 5.0.94 - GLPI 0.80.61 - OCS 1.1.2

Offline

#9 2012-01-24 18:45:08

level6
Member
Registered: 2012-01-19
Posts: 11

Re: Scheduled Task Not Working

I found these two files in /var/www/html/glpi/scripts:

-rwxrwxr-x.  1 apache apache  237 Jan 24 10:37 glpi_cron_curl.sh
-rwxrwxr-x.  1 apache apache  238 Jan 24 10:36 glpi_cron_lynx.sh


/var/www/html/glpi/scripts# less glpi_cron_lynx.sh
#!/bin/sh
# # @version $Id:
# Little script for stimulate the pseudo cron of glpi
# YOU MUST EDIT THE URL
# Vous devez editez l'URL selon votre installation

/usr/bin/lynx -source http://YOURSERVER/glpi/front/cron.php > /dev/null 2>&1

But, I cannot find any documentation about them.  I tried editing the "YOURSERVER" with our IP address and running the lynx script manually, but nothing seems to have happened.  I then tried the lynx command w/o redirection to null and it appears to spit out a very small GIF, that is all.

Are these scripts important to getting the automated actions running?

Raymond.


CentOS 6 - PHP 5.3.3-3.el6_2.5 - MySQL 5.1.47-4.el6 - OCS 2.0.3 - GLPI 0.80.61

Offline

#10 2012-01-24 18:54:58

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Scheduled Task Not Working

No this scripts are not useful, especially on linux

Using it, you run the cron in standard GLPI mode with the limit of the web server (max_execution_time, memory_limit, ...)

Under linux, it so simple to run the front/cron.php... and set task in "CLI" mode.


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#11 2012-01-24 19:04:20

level6
Member
Registered: 2012-01-19
Posts: 11

Re: Scheduled Task Not Working

# date
01/24/12 11:01:58
# pwd
/var/www/html/glpi/front
# php cron.php
#
Automatic actions - ID 1     
Name :     ocsng    Comments :     
Description :     Synchronize equipments from OCSNG
Run frequency :     5 Minute(s)
Status :     Scheduled
Run mode :     GLPI
Run period :     0 -> 24
Number of days this action logs are stored :         30 Day(s)

Last run :     01-23-2012 21:27 Blank
          Next run :     As soon as possible (01-23-2012 21:32) - Execute
Date    Total duration    Number    Description
01-23-2012 21:27    0.314s    7    Action completed, fully processed
01-22-2012 22:01    0.250s    7    Action completed, fully processed
01-21-2012 04:07    0.205s    2    Action completed, fully processed
01-20-2012 22:57    0.266s    3    Action completed, fully processed
01-20-2012 21:27    0.260s    3    Action completed, fully processed
01-20-2012 14:50    0.659s    4    Action completed, fully processed
01-20-2012 04:21    0.582s    2    Action completed, fully processed
01-20-2012 03:48    0.020s    0    Action completed, no processing required
01-19-2012 18:23    0.021s    0    Action completed, no processing required
01-19-2012 18:18    0.026s    1    Action completed, fully processed
01-19-2012 17:59    0.442s    1    Action completed, fully processed
01-19-2012 17:44    0.043s    0    Action completed, no processing required

Nothing.  Is there something else for me to do?

Raymond.


CentOS 6 - PHP 5.3.3-3.el6_2.5 - MySQL 5.1.47-4.el6 - OCS 2.0.3 - GLPI 0.80.61

Offline

#12 2012-01-24 19:08:02

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Scheduled Task Not Working

Run mode :     GLPI => CLI


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#13 2012-01-24 19:10:42

level6
Member
Registered: 2012-01-19
Posts: 11

Re: Scheduled Task Not Working

AHA!  Now I understand what that meant.  This worked for me.  THANK you!

Raymond.


CentOS 6 - PHP 5.3.3-3.el6_2.5 - MySQL 5.1.47-4.el6 - OCS 2.0.3 - GLPI 0.80.61

Offline

Board footer

Powered by FluxBB