Rail Balco Posted November 8, 2017 Share Posted November 8, 2017 Hi I'm working on module that is using Cron. I have set all I need and when I go to file skl_advancedsubscriber-cron.php (the one I quote below) directly, script runs OK. As you can see, I am using FileLogger to get output to logfile. <?php include(dirname(__FILE__).'/../../config/config.inc.php'); include(dirname(__FILE__).'/../../init.php'); $file = _PS_ROOT_DIR_ . '/app/logs/cronTest.log'; $logger = new FileLogger(); $logger->setFilename($file); $logger->logMessage('Include', 1); include(dirname(__FILE__).'override/modules/mailchimpintegration/mailchimpintegration.php'); $logger->logMessage('Trying init MailChimpIntegrationOverride', 1); $McOverride = new MailChimpIntegrationOverride(); $logger->logMessage('Init MailChimpIntegrationOverride', 1); $McOverride->syncEmlSubsciption(Configuration::get(SKL_EMAILSUBSCRIPTION_GDPR_LAST_UPDATE)); Configuration::updateValue('SKL_EMAILSUBSCRIPTION_GDPR_LAST_UPDATE', Date("Y-m-d H:i:s", Time())); But when I use system CRON, suddenly my script stops on line $McOverride = new MailChimpIntegrationOverride(); By changing 'include' to 'require' I realized script can't access to Mailchimp overriding class override/modules/mailchimpintegration/mailchimpintegration.php Please note this file DOES NOT CHANGE, when I access skl_advancedsubscriber-cron.php directly I get input I am expecting, but when CRON scheduled task is trying to access this, script ends with HTTP500. Anyone having experience with this? Any idea what might be a solution? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now