Ask questions about installing and configuring ProcessMaker 3
#789412
I'm following this wiki page:

http://wiki.processmaker.com/3.1/Executing_cron.php

If I launch this command:
php -f /opt/processmaker/workflow/engine/bin/sendnotificationscron.php

I get my notifications.

But the cron doesn't launch this automatically.

I have configured this file:

/etc/cron.d/processmaker
Code: Select all
0  * * * * root php -f /opt/processmaker/workflow/engine/bin/cron.php
10 * * * * root php -f /opt/processmaker/workflow/engine/bin/messageeventcron.php
15 * * * * root php -f /opt/processmaker/workflow/engine/bin/timereventcron.php
20 * * * * root php -f /opt/processmaker/workflow/engine/bin/ldapcron.php
25 * * * * root php -f /opt/processmaker/workflow/engine/bin/sendnotificationscron.php
30 * * * * root php -f /opt/processmaker/workflow/engine/bin/cron.php
40 * * * * root php -f /opt/processmaker/workflow/engine/bin/messageeventcron.php
45 * * * * root php -f /opt/processmaker/workflow/engine/bin/timereventcron.php
50 * * * * root php -f /opt/processmaker/workflow/engine/bin/ldapcron.php
55 * * * * root php -f /opt/processmaker/workflow/engine/bin/sendnotificationscron.php
But in cron log, I see con as inactive.

Image

What more I should to check?
#789474
If you are talking about the cron log in ProcessMaker's graphical interface (under Admin > Logs > Cron), it currently doesn't work with BPMN processes, but that bug should be fixed in version 3.2. You have to look at the log files located on your PM server at /shared/log/cron.log (and if an error occurred then the file shared/log/cronError.log will be created).

By the way, if you have a lot of cases, you should give your server longer than 5 minutes to execute each script.
#789870
Hi,
these php-scripts may better run in a bash-script (cron uses SH). Especially, if you have to supress the standard-output of commands.
Alternatively you can write a bash-script and call this bash-script via cron. This has also the advantage, that the php-commands are fired sequentially.
Combined with a check-mechanism (lock-file, which is present only during the runtime of your bash-script) you can avoid multiples triggers of your commands.

For Example create a bash-script and make it executable. For example /opt/processmaker/pm-allcronjobs.sh
Code: Select all
#! /bin/bash
# This bash-script redirects to php-commands in order to schedule activities of ProcessMaker.
#
# The script is called by cron : see /etc/cron.d/processmaker
#
############################################

### set the variable for the lockfile
LOCKFILE=/opt/processmaker-crons-are-active.txt


### check if lockfile exists & exit
if [ -e ${LOCKFILE} ] && kill -0 `cat ${LOCKFILE}`; then
    exit
fi

### make sure the lockfile is removed when we exit and then claim it
trap "rm -f ${LOCKFILE}; exit" INT TERM EXIT
echo $$ > ${LOCKFILE}

### run desired commands
/bin/php -f /opt/processmaker/workflow/engine/bin/cron.php +force > /dev/null 2>&1
/bin/php -f /opt/processmaker/workflow/engine/bin/timereventcron.php > /dev/null 2>&1
/bin/php -f /opt/processmaker/workflow/engine/bin/messageeventcron.php > /dev/null 2>&1

### finally remove the lockfile
rm -f ${LOCKFILE}

Add your sendnotfication to the list above ...
This way you can trigger all command in sequence as often as you need without collision.

After this, edit your cronfile
/etc/cron.d/processmaker
Code: Select all
# Every 5 minutes from 6h to 18h, Monday to Friday
*/5  6-18 * * 1-5 root /opt/processmaker/pm-allcronjobs.sh > /dev/null 2>&1
"/dev/null 2>&1" supresses any output, which you don`t need when scripts run automatically. The logging into logfiles is not affected !!
The lockfile contains the ProcessID (PID) of your bash-script, so you can identify and kill it, if anything goes wrong.

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]