duan3601
2015-03-06 15:51
浏览 20
已采纳

Zend Frame Work Cron Error

My second cron action (sendDailyRecap) works however I also get an email informing me of an error.

Error Message:

Zend Framework 2.3.3 application
Usage:

Reason for failure: Invalid arguments or no arguments provided

I believe the issue lies in my module.config file. Any ideas why I'm getting an error (when the job executes correctly)? I would like to fix this so I no longer get the error email. Thanks

module.config

<?php
return array(
    'controllers' => array(
        'invokables' => array(
            'Cron\Controller\CronController' => 'Cron\Controller\CronController',
        ),
    ),
    'console' => array(
        'router' => array(
            'routes' => array(
                'cronroute' => array(
                    'options' => array(
                        'route'    => 'sendTest',
                        'defaults' => array(
                            'controller' => 'Cron\Controller\CronController',
                            'action' => 'index'
                        ),
                        'route'    => 'sendDailyRecap',
                        'defaults' => array(
                            'controller' => 'Cron\Controller\CronController',
                            'action' => 'sendDailyRecap'
                        ),
                    )
                )
            )
        )
    )
);

Cron Command

/usr/bin/php-cli /home/financialfriend/public_html/public/index.php sendDailyRecap

/usr/bin/php-cli /home/financialfriend/public_html/public/index.php sendTest

1条回答 默认 最新

相关推荐 更多相似问题