- set_time_limit(300) prevents infinite SMTP hangs
- Fallback to admin user if $user is empty in cronjob context
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace $conf->global->MAIN_INFO_SOCIETE_MAIL with getDolGlobalString()
to prevent fatal error when constant is not set. This caused the
cronjob to hang on the productive server.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Wrap updatePrices() in try-catch for fatal errors
- Separate try-catch for GlobalNotify and mail sending
- Prevents SMTP timeouts from blocking the entire cronjob
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>