Thursday 14 April 2011 7:04:23 am
Hi, Is there a clean way to use notification cronjob with multiple siteaccess ? Trying to explain our problem. We've got one eZ instance with a dozen of siteaccess. Each siteaccess have a domain or a subdomain declared in site.ini override and associated to a node. First, I put runcronjobs.php in cron without anything. It take the default siteaccess to generate url, wich is not what we want. So I made a cron per siteaccess with -s option. Sounds good, but in fact it's not. -s option doesn't care where the new element is published.
Structure:
- Root
- - site1 (www.site.com)
- - site2 (www.site2.com)
- - site3 (aaa.site2.com) -...
Cron:
1,31 * * * * www-data cd $EZPUBLISHROOT; $PHP runcronjobs.php -q -s site1 notification
2,32 * * * * www-data cd $EZPUBLISHROOT; $PHP runcronjobs.php -q -s site2 notification
3,33 * * * * www-data cd $EZPUBLISHROOT; $PHP runcronjobs.php -q -s site3 notification ... Notification is just a cronpart where there's only notification.php ;)
If I put an object in site2 at 2:50, notification will be generated by the site1 cronjob which will send emails with wrong url. In the same way, if I published an object at 3:31 (+seconds) in site1, notification will be generated with site2 cronjob ! So, is there a workaround to use notification like that or we have to made another notification script that respond to our need ? Thanks for your answers or ideas ;)
|