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 6817789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:05:54+00:00 2026-05-26T21:05:54+00:00

I have a script in app/vendors/shells which is executed periodically via cron. In that

  • 0

I have a script in app/vendors/shells which is executed periodically via cron. In that script I import the Router:

class AutosuggestFileShell extends Shell {
    var $uses = array('User','Country','City','Speciality','Alias');

    function main() {
        App::import('Core', 'Router');
        //...

But the script is not using the routes I have defined in routes.php. For example, I have defined:

Router::connect('/plastic-surgeon/*', array(
    'controller' => 'users', 'action' => 'profile'
));

But in the script the line:

'path' => Router::url(array(
    'controller' => 'users', 'action' => 'profile', $user['User']['slug']
))

is not generating the URL plastic-surgeon/slug – instead it generates the URL users/profile/slug.

Router::url() works fine in different points of the website, for example inside a view to generate a sitemap. Therefore I guess I need to import something from the shell script or maybe it is not possible to load the data contained in routes.php from the shell script?

(I’m using CakePHP 1.3)

  • 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-26T21:05:55+00:00Added an answer on May 26, 2026 at 9:05 pm

    IF you want to import the routes try

    config('routes');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a script that imports a models.py from an app, but it will
I have a Ruby script in my Rails app that I use to load
I have got a demo script that lets me authorize with my app and
I have a Haskell script that runs via a shebang line making use of
I have a script that I run which does a lot of tasks and
I have a script that runs CPAN::Mini::Inject actions and has an App::Cache. It works
In order to debug an asp.net web app I have to have IE Script
I have follwing JSON: {mykey:[{name:Jak,interests:movies}]} and following opensocial app code: <script type=text/os-template require=mykey> <ul>
I have a small helper app that I use to inject scripts into html
I have a C++ app that uses Python to load some scripts. It calls

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.