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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:30:50+00:00 2026-06-04T17:30:50+00:00

I want to execute a cron in symfony (version 1.4.8). I am trying to

  • 0

I want to execute a cron in symfony (version 1.4.8).

I am trying to use tasks through command: php symfony generate:task taskName.

The task generated through this is stored in lib/task directory and it has access to all my outer ‘lib’ files. I also want my other lib folders i.e. the libraries present in apps also to be accessible in this task. how can I do that?

And when do we set $namespace in the task as ‘project’ and as ‘application’?

  • 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-06-04T17:30:53+00:00Added an answer on June 4, 2026 at 5:30 pm

    You can do use the following within the crontab

    /usr/bin/php /var/www/yourproject/symfony namespace:task --param=value
    

    You will need to change /usr/bin/php to match your path to the PHP executable and /var/www/yourproject to match your project directory

    The namespace and task should be whatever you have configured within your task :

    $this->namespace = 'mynamespace';
    $this->name = 'mytaskname';
    

    here for example the namespace is mynamespace and the taskname is mytaskname

    The following is the contents of a default autoload.yml showing which files are autoloaded by default :

    autoload:
      # project
      project:
        name:           project
        path:           %SF_LIB_DIR%
        recursive:      true
        exclude:        [model, symfony, vendor]
    
      project_model:
        name:           project model
        path:           %SF_LIB_DIR%/model
        recursive:      true
    
      # application
      application:
        name:           application
        path:           %SF_APP_LIB_DIR%
        recursive:      true
    
      modules:
        name:           module
        path:           %SF_APP_DIR%/modules/*/lib
        prefix:         1
        recursive:      true
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a php script which will run through cron . Its task
I want to set up a cron job which will execute a command every
I have asp.net generated html code. I want execute jQuery click function when user
I want to execute a script every 30mins, but i want to use it
I want to use Maven for PHP with PHPUnit but when I run my
I've one rake task which i want to execute once every day: in production
I have Linux, PHP installed. I want to set the cron job which will
I have set up a cron task and I want to save the output
I want to programatically change the hour which certain cron jobs execute. I'm not
I have a page that I want to execute via cron. It just does

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.