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-03-27 10:26:44

Jolly_Swede
Member
Registered: 2012-02-16
Posts: 28

Scheduled tasks

Hi! I am using the default schedule for mailgate. Problem is it doesn't get new mail at it's scheduled times. It says: "Last run: 2012-03-27 10:03", "Next run: 2012-03-27 10:13". Time here is 10:18 and it still haven't run. I can execute it manually and it runs fine. All other task seem to be running on their schedule. What can be the cause of this?
I am running GLPI on SUSE linux Enterprise Server 11 Service Pack 1 (11.1.1.9), Apache 2.2.12-1.30.1, PHP 5.3.8-4.2.1 and MySQL 5.0.94-0.2.4.1.

Offline

#2 2012-03-27 11:45:03

Jolly_Swede
Member
Registered: 2012-02-16
Posts: 28

Re: Scheduled tasks

10:44 and it still haven't run.

Offline

#3 2012-03-27 11:49:55

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

Re: Scheduled tasks

Not enough activity on GLPI.

Should configure an system cron task and use 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

#4 2012-03-28 11:28:38

Jolly_Swede
Member
Registered: 2012-02-16
Posts: 28

Re: Scheduled tasks

What service or action should I configure the cron task to run?

Offline

#5 2012-03-29 15:12:44

danh
Member
From: Chicago, USA
Registered: 2012-03-08
Posts: 546
Website

Re: Scheduled tasks

I have the same issue.  I found this article about cron tasks: http://www.glpi-project.org/wiki/doku.p … ig:crontab

Not to hijack, but I do not know how to set it up.  I am using linux, so do I run the Linux command from anywhere, or does that go into a file somewhere?
command: */5 * * * * /usr/bin/php5 /var/www/monsite.com/glpi/front/cron.php &>/dev/null


Thanks,
Dan

Offline

#6 2012-03-29 15:43:34

mika
Member
Registered: 2012-03-14
Posts: 5

Re: Scheduled tasks

You have to execute the following commands to configure a cronstask:

#su - www-data
# crontab -e
Write at the end of the file the command from danh (maybe without the >/dev/null, becouse there is no need for it)

save and close it (strg+o+strg+x) and you are done smile


I can't post the real command, because i get the forum error:
"Too more links in message. Allowed 1 links. Reduce number of links and post it again."

Offline

#7 2012-03-29 17:33:11

danh
Member
From: Chicago, USA
Registered: 2012-03-08
Posts: 546
Website

Re: Scheduled tasks

I am stuck at the su -www-data

What is this, as it is asking for a password and my user pw is not working.
I can use this command: crontab -u user -e and I get a new file, but adding the code there does nothing


Thanks,
Dan

Offline

#8 2012-03-29 20:10:43

danh
Member
From: Chicago, USA
Registered: 2012-03-08
Posts: 546
Website

Re: Scheduled tasks

ok, I did get past the www-data (user account)

I did this and it still isn't showing as working


Thanks,
Dan

Offline

#9 2012-03-29 22:27:42

danh
Member
From: Chicago, USA
Registered: 2012-03-08
Posts: 546
Website

Re: Scheduled tasks

I checked /var/log/syslog and my cron is listed here.  What am I missing that it's not running in glpi then?
If I execute manually it works fine.


Thanks,
Dan

Offline

#10 2012-03-29 23:25:40

danh
Member
From: Chicago, USA
Registered: 2012-03-08
Posts: 546
Website

Re: Scheduled tasks

I don't think any of my scheduled tasks are running....


Thanks,
Dan

Offline

#11 2012-03-30 15:59:14

danh
Member
From: Chicago, USA
Registered: 2012-03-08
Posts: 546
Website

Re: Scheduled tasks

I've checked my syslog and the cron is running, but with errors:

I've installed SSMTP and resolved all but 1 error:
CRON failed with status 1

And why is the glpi run mode not working for any task?

Last edited by danh (2012-03-30 16:51:23)


Thanks,
Dan

Offline

#12 2012-03-30 18:18:31

danh
Member
From: Chicago, USA
Registered: 2012-03-08
Posts: 546
Website

Re: Scheduled tasks

danh wrote:

I've checked my syslog and the cron is running, but with errors:

I've installed SSMTP and resolved all but 1 error:
CRON failed with status 1

And why is the glpi run mode not working for any task?

Yikes, this a huge PITA...

I removed the crontab for www-data, and set one up for the default user

sudo crontab -e

This coupled with the install of SSMTP, fixed my issue!


Thanks,
Dan

Offline

Board footer

Powered by FluxBB