Regular Events execution environment differs

2 views
Skip to first unread message

er...@intechnic.lv

unread,
Aug 19, 2011, 9:44:14 AM8/19/11
to In-Portal Development Team
I noticed that if RegularEvents run through a cron (file tools /
cron.php), then the script runs with a constant "define ('ADMIN', 1)."
If in the adm.console start from cron is switched off, then
RegularEvents are processed on Front-end. Because of this the result
of RegularEvents may differ significantly. For example, if you want to
parse some template in the RegularEvent, then when you run via
cron.php - the template file will be matched within admin_templates,
and if on the the Front-end - in themes.

Maybe is necessary to make RegularEvents always run the same way -
either in admin or as a front-end - regardless of whether cron is
enabled or not.

Alexander Obuhovich

unread,
Aug 19, 2011, 10:09:21 AM8/19/11
to in-por...@googlegroups.com
This usually is not a problem, since in default In-Portal installation all regular events (agents) work fine no matter of execution method (linux cron or just a regular front-end user visit).

For websites, who have some customizations made we set cron to always run as ADMIN from command line and all works pretty well.

Reply all
Reply to author
Forward
0 new messages