Skip to content
This repository was archived by the owner on Sep 23, 2022. It is now read-only.
This repository was archived by the owner on Sep 23, 2022. It is now read-only.

Is there a way to force a command to autorun? #2

@calevans

Description

@calevans

I have a script using the ConsoleServiceProvider and I want it to auto run a command when I run it.

$app->register(new ConsoleServiceProvider(),
                array('console.name'              => 'ScanJobs',
                      'console.version'           => '1.0.0',
                      'console.project_directory' => __DIR__.'/..'));
$application = $app['console'];
$x = new ScanJobsCommand();
$x->addGeocodeer(new Geocode());
$application->add($x);
$application->run();

When run is called, I want it to execute a specific command. Is there a way to do this? right now I call the script with a parameter and it works fine. I just want to eliminate the parameter.

=C=

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions