CronJobs on Mailwizz Yii

######## @ INIT ########### /* -Add console as allowed app -Set public $cliEnabled to true */ class ClassEXT extends ExtensionInit { // 'backend', 'customer', 'frontend', 'console', 'api' public $allowedApps = array('backend', 'customer','console'); // TODO allowedApps public $cliEnabled = true; ####### @ Console Behavior ###### /* -add console/component/behavior -use hooks to add your function on cronjobs (list of cronjob below ### ) */ <?php namespace ext_recurring_payments\console\components\behaviors; defined('MW_PATH') || exit('No direct script access allowed'); class AppBehavior extends \CBehavior { /** * Called when app is console */ public function run() { \Yii::app()->hooks->addAction('console_command_send_campaigns_after_process', array($this, 'FUNCTION_HERE')); } /* * This will automatically deactive customer once the Price Plan is Due */ public function FUNCTION_HERE($command) { //your action here } ########### List of cronjobs ########### /* - open CMD // for listing the cronjob commands - type php "{{YOUR DIRECTORY}}\{{your site folder}}\apps\console\console.php" (basically , find your console.php) // for testing your function on cronjob use like this // php <file location > <command> php "F:\xampp\htdocs\{{site_fodler}}\apps\console\console.php" daily */

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.