Symfony-Bundle
Symfony-Bundle copied to clipboard
Could not open input file: bin/console
Upgrading v2.2 to v2.3 causes Could not open input file: bin/console error in cron_report. Symfony 4.4.4
Changing the service cron.resolver argument %kernel.project_dir% to %kernel.root_dir% fixes the issue. This was changed to %kernel.project_dir% in commit 2ad1a7c1d0efdb8208e42aec73195d24c47d223c
This issue is happening because ShellJob setCommand $cwd is being set to ./src which is causing Process to try to run bin/console from the src directory
Could you add a check for Symfony 5 and adjust this argument as needed please.
Hi Evotodi,
Thanks for the solution. It resolve the bin/console issue, but using the bundle, I can't schedule the jobs.
I have create my command and my cron job, right saved in the cron_job table with schedule * * * * * or */1 * * * * (1 minute between jobs). When I run php bin/console cron:run, the cron runs correctly and saves the record in the cron_report table with the output, but it doesn't run periodically in the scheduled period.
I am running xampp on Windows, so I can't run cron:start because pcntl extension doesn't exist on Windows.
How can I make the cron run automatically using my xampp on Windows?
Thanks
Crapula, First check out crontab.com for help understanding cron expressions if you need because both cron expressions are the same. Next windows has task scheduler which is like linux cron if you stretch the word like. You could schedule a task to run php bin/console cron:run every minute. Btw you will most likely have to use full paths to php and console in the task. If you are interested in linux download Docker for windows and spin up a php linux container or full blown lamp container.
Hi Evotodi,
Thanks for the quickly answer. I already valued that option, but I was trying to manage it inside my project in case I could not access to windows manage task. This way, using symfony and the windows task scheduled, it makes sense to use the cron bundle? I mean, if I scheduled the period time in the windows task scheduled I could run "php bin/console MYCOMMAND" instead php bin/console cron:run, isn't right? Is there any benefit use the cron:bundle?
Tanks for your help.
When coding there is almost always multiple ways of accomplishing the same outcome and which way you choose is highly dependent upon what you are typing to accomplish and your way of looking at the task. Using cron-bundle vs task scheduler is dependent upon your setup and circumstances. BTW this is getting rather off topic of the OP's issue and should be posted in a forum.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.