laravel/framework

schedule:work run artisan relative to current working dir

Aberta

#56.390 aberto em 23 de jul. de 2025

 (2 comentários) (0 reação) (0 responsável)PHP (11.939 forks)batch import
help wanted

Métricas do repositório

Stars
 (34.846 estrelas)
Métricas de merge de PR
 (Mesclagem média 1d 22h) (129 fundiu PRs em 30d)

Description

Laravel Version

12.19.3

PHP Version

8.4.10

Database Driver & Version

No response

Description

Hello,

The command artisan schedule:work run artisan schedule:run every minutes, but this works only if we are in the same directory than artisan

Steps To Reproduce

  • Create laravel in /home/laravel.
  • Go in /home/laravel run php84 artisan schedule:work it WORKS
  • Go in / run php84 /home/laravel/artisan schedule:work it DOESN'T WORKS

It raise

...
Could not open input file: artisan
Could not open input file: artisan
Could not open input file: artisan
Could not open input file: artisan
... 

Example

[root@server /]$ /bin/php84 /home/laravel/artisan schedule:work
Could not open input file: artisan
^C
[root@server ~]$ cd /home/laravel
[root@server ~]$ /bin/php84 /home/laravel/artisan schedule:work
  2025-07-23 20:30:00 Running [TASK #1]  395.67ms DONE

Guia do colaborador