Forums / Install & configuration / Workflow processes

Workflow processes

Author Message

Vicente Olivan

Saturday 19 January 2008 4:54:35 am

I have a workflow approve. When items are approved, it will not be published on website

In Workflow processes - content/publish/pre_publish : [7] all items show:

Process status
(4) Workflow event deferred to cron job

Current event
status : (4) Event deferred to cron job, event will be rerun
event type : ezapprove
description : approve

Run php runcronjobs.php, php -C runcronjobs.php, php -C runcronjobs.php –s <siteaccess> shows same results, but nothing happens:

php runcronjobs.php
Running cronjobs/unpublish.php

Running cronjobs/rssimport.php

Running cronjobs/indexcontent.php
Starting processing pending search engine modifications
Done

Running cronjobs/hide.php

Running cronjobs/subtreeexpirycleanup.php

Running cronjobs/internal_drafts_cleanup.php
Cleaning up internal drafts...
Cleaned up 0 internal drafts

What am I doing wrong?
Thanks in advance

Vicente Olivan

Sunday 20 January 2008 11:18:32 pm

I´m confused. I really need help ... What is the problem in the workflows?

Thanks

edu miralles

Wednesday 05 March 2008 6:25:24 am

Try to run only frequent jobs:

php runcronjobs.php frequent

read cronjob.ini on settings folder to have more informations
emiri

ivan posta

Monday 30 March 2009 9:17:53 am

I have the same problem :(

jp matji

Wednesday 26 August 2009 12:49:38 am

hello,
i have the same problem, Ivan did you find the solution ?
thanks !

André R.

Wednesday 26 August 2009 1:38:07 am

The answer is in the post from emiri above, there are several cronjob parts (group of tasks), and workflow.php is in the "frequent" part.
The whole point with several parts is that some cronjobs should be run very often, and some not.

It's more in depth explained here, and the page also shows what parts the different cronjobs are by default:
http://ez.no/doc/ez_publish/technical_manual/4_x/features/cronjobs/configuring_cronjobs

Further reading, where you get recommended crontab setup for linux/unix:
http://ez.no/doc/ez_publish/technical_manual/4_x/features/cronjobs/running_cronjobs

The syntax for running the cronjobs from command line is:

php runcronjobs.php [-s <siteaccess_name>] [<cronjob_part>]

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

jp matji

Wednesday 26 August 2009 4:49:41 am

Thanks André, but my problem is not to run workflow.php : when "php runcronjobs.php frequent" is runing i have on the output :

"Checking for workflow processes
Status list
l'évènement de processus de workflow est reporté à la commande de cron(4) : 6
0 out of 6 processes was finished "

thne i think that the status of my workflow processes is STATUS_DEFERRED_TO_CRON (4) but i don't know why and would like to know what to do .

thanks !

Pierre SCALFATI

Thursday 27 August 2009 1:18:38 am

Hi there,

I've exactly the same problem. Here is the message I can see in my pending list :

process status "(4) Workflow event deferred to cron job"
current event "status : (4) Event deferred to cron job, event will be rerun
event type : ezapprove
description : Approve".

Is there someone how could help us on fixing this problem ?

I asked my web hosting provider to run a cronjob at midnight everyday, the cronjob should have been executed but I can't see my messages published in my web site.

It's very blocking for us, I really need help on this. And I must admit that it's very annoying to not have the possibility to see the messages and publish them direcly by a simple click of button from the admin console of EZP. When will we have a very simple way of working which can avoid us using cronjobs and complicated ways of functioning ?

If someone could help, it would be great !!!
Many thanks.

Pierre SCALFATI

Friday 28 August 2009 8:55:55 am

I've an error in my logs, I don't know if it explains the problem I'm facing :

PHP Fatal error: Class 'eZDB' not found in /home/httpd/vhosts/my_website/httpdocs/cronjobs/workflow.php

I must precise that locally, on my computer, the workflow works but it doesn't when it is published on the servers of my web hosting provider.

and here is what I have in my cronjob.ini.append.php

[CronjobSettings]
ScriptDirectories[]=cronjobs
Scripts[]
Scripts[]=unpublish.php
Scripts[]=indexcontent.php
Scripts[]=hide.php
Scripts[]=subtreeexpirycleanup.php
Scripts[]=internal_drafts_cleanup.php
Scripts[]=workflow.php
Scripts[]=ldapusermanage.php
ExtensionDirectories[]

NB: my EZP Version : 4.1.1

Any clue ?

André R.

Saturday 29 August 2009 4:26:31 am

That class should be there, some things you can try:
* check autoload/ezp_kernel.php, and search for eZDB, it should be there and correctly point to lib/ezdb/classes/ezdb.php
* Make sure APC is disabled for cli, this can be done with apc.enable_cli=0 in php.ini which is the default setting. (You can check which php.ini file is used with "php --ini")
* Enabled debugging, use "php -e runcronjobs.php frequent -s <siteaccess_name> -dall"

BTW: I got some database errors as well here (not the same one though), and the reason was because I had forgotten to enable the mysqli (which I use in eZ Publish) extension in php.ini.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Pierre SCALFATI

Saturday 29 August 2009 6:52:22 am

Hi André,

As always, thank you for your reply. I've transmitted to my web hosting provider the information you gave me concerning the php.ini (as I have no access to that file). I checked for EZDB library and everything is ok concerning the existence, the path of the library and the read/execute rights for it which are configured to read/execute for everybody. So, I wonder what is causing such error message...

What is very frustrating is that locally I have no problem. Maybe the installation of EZPUBLISH 4.1.1 was not made correctly by my provider or something is missing...I don't know... I'll be giving you more information once he will have checked the php.ini file...

Meanwhile, if you have some other clues, don't hesitate.

Cheers.

Pierre SCALFATI

Monday 31 August 2009 4:49:05 am

Hello,

For me everything was solved due only to a misunderstanding of my web hosting provider who was not executing the runcronjobs.php as a php line command but more as a direct call to the file.

I don't know if this can help the other members of the forum who initially opened this discussion. If it's not the case, I hope solutions will be found for them. So please if someone can bring answers, thank you for them.

Just to try to give some clues to other members of the forum, I created locally a batch file (under my Windows system) and put in it this command line :

if you are running a Wamp server :

"C:\wamp\bin\php\php5.2.8\php.exe" "C:\wamp\www\my_website_folder\runcronjobs.php"
pause

NB : the C:\wamp\bin\php\php5.2.8\php.exe must be changed by the path to the php.exe of your Wamp server version

If you are running Easyphp, put this :

"C:\Program Files\EasyPHP1-8\php\cli\php.exe" "C:\Program Files\EasyPHP1-8\www\my_website_folder\runcronjobs.php"
pause

NB : the C:\Program Files\EasyPHP1-8\php\cli\php.exe must be changed by the path to the php.exe of your Easyphp server version.

Executing the batch file will let you see first if there are no errors (as the pause command freezes the display to let you read what happened during execution) and will allow you to examine if the publication has worked on your local front-office website.

I hope it will help.

Cheers.