Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6698425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:34:35+00:00 2026-05-26T06:34:35+00:00

I need to be able to run my application through cron on a linux

  • 0

I need to be able to run my application through cron on a linux ( debian machine )

As such i have created a cron.php which only loads the relevant bootstrap stuff i need i also force the default module to be ‘cron’ as opposed to the current default.

i run the cron as such:

cron.php action=[actionname] controller=[contollername]

i have setup a router to take the parameters from the cli and use it within my application. In my current case it will force the action and controller to be what has been asked

$getopt     = new Zend_Console_Getopt (array ());
$arguments  = $getopt->getRemainingArgs();

.... set controller correctly using arguments 
.... do other stuff

$dispatcher->setControllerName($controller);
$dispatcher->setActionName($action);
$dispatcher->setParams($params);

when i run the following on windows i get what i expect, which is the controller and action loads – executing the code as expected

c:\php -c [path_to_ini] -f cron.php action=send controller=mail

but when i run the exact same code on linux i get a strange exception:

:~$ php -c [path_to_ini] -f [path_to_cron]cron.php controller=mail action=send

Exception Found:
    Name: Zend_Controller_Dispatcher_Exception
    Message:Cannot load controller class "IndexController" from file "[path_to_application]/modules/cron/controllers/IndexController.php'

Stack Trace:
0 [path_to_zend]/Controller/Dispatcher/Standard.php(262): Zend_Controller_Dispatcher_Standard->loadClass('IndexController')
1 [path_to_zend]/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Simple), Object(Zend_Controller_Response_Http))
2 [path_to_zend]/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
3 [path_to_zend]/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
4 [path_to_application]/public/cron.php(36): Zend_Application->run()

why might linux be loading a different controller than windows. i am quite to very stumped.

thanks in advance

additional health notes:

dumping the controller and action within my router shows that i’m properly setting the controller and action on both *nix and doze.

I’ve tried looking within /Zend/Controller/Dispatcher/Standard.php(262) and it seems at this point the controller has changed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T06:34:36+00:00Added an answer on May 26, 2026 at 6:34 am

    Most likely when something works well on Windows and not on Linux it is a problem with upper/lower case mismatches. I would look for this first 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to be able to run RegLoadKey() on a remote machine, and it
I need to be able to run an Oracle query which goes to insert
I have an app that normal users need to be able to run, but
I need to be able to run HTML forms offline. I mean they have
What exactly does a mobile need to be able to run JavaFX? Can it
In order to create the proper queries I need to be able to run
I need to be able to determine at run time what compilation options were
I need to be able to specify a command to run when the SelectionChanged
I have created an application in VS C# Express 2008 using Windows 7 as
I have run into this issue too many times and need this to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.