0

I'm trying to run a cron job in my laravel project. I run the following command

* * * * * cd c:/PaginasWeb/intranet php artisan schedule:run >> /dev/null 2>&1

and I miss the error

The system can not find the path specified

But that's the route where my project is located, It's the first time I try to do a cron job, and I do not know if I'm doing wrong. The command is executed from c: /

Edwin Aquino
  • 201
  • 2
  • 16
  • What operating system are you running on? – Roman Nov 21 '18 at 14:36
  • 3
    How exactly are you running this? Because that looks very like a Windows path, and Windows doesn't have a crontab in the same way that Linux does. – iainn Nov 21 '18 at 14:36
  • 1
    Possible duplicate of [How to run task scheduler in windows 10 with Laravel 5.1](https://stackoverflow.com/questions/36305146/how-to-run-task-scheduler-in-windows-10-with-laravel-5-1) – iainn Nov 21 '18 at 14:36
  • I'm in windows server 2012 R2 – Edwin Aquino Nov 21 '18 at 14:37
  • You'd need a `&&` between the path and `php` – aynber Nov 21 '18 at 14:43
  • @aynber now it appears "*" is not recognized as an internal or external command, program or batch file executable. – Edwin Aquino Nov 21 '18 at 14:50
  • How are you attempting this? Windows doesn't use the same type of cron that linux uses, so this string won't work for you. Check out https://stackoverflow.com/questions/7195503/setting-up-a-cron-job-in-windows and https://moreabout.tech/creating-cron-jobs-in-windows-8-and-server-2012-or-any-version-of-windows/ – aynber Nov 21 '18 at 14:52

0 Answers0