Indatus / dispatcher

Dispatcher is a Laravel artisan command scheduling tool used to schedule artisan commands within your project so you don't need to touch your crontab when deploying.
MIT License
1.06k stars 70 forks source link

On Windows > NULL creates file #118

Closed CedNet closed 9 years ago

CedNet commented 9 years ago

Hi again, on my Windows machine with version 1.4 the --debug says the following is run:

command:send_reminders: START /B php G:\xxx/artisan command:send_reminders > NULL

The problem is that on Windows this creates a file called NULL in the application root. I believe this is not intended and hopefully can be resolved. Can't see anywhere in the docs how to prevent it.

Could you please somehow allow for the option of excluding the last argument after the command is run? Or, simply if Windows, no > NULL is appended.

bkuhl commented 9 years ago

I think I originally had this as > nul and someone submitted a PR saying that it wasn't working as intended. According to http://stackoverflow.com/questions/4507312/how-to-redirect-stderr-to-null-in-cmd-exe > nul is correct. Can you test this out on your system and verify this doesn't create the file?

CedNet commented 9 years ago

On Windows you use the Schedule task feature and there I now tried with:

php artisan scheduled:run > NUL (also tried 2> nul)

But, this makes the command not run at all and the schedule task window won't say it has run (if you force run it right away). I'll admit, Im not sure I did it the right way. Do you know?

I'm sure few uses Windows, but if it's an issue maybe it would be possible to somehow force it not to append anything to the command?

bkuhl commented 9 years ago

I haven't scheduled tasks in Windows so I'm not really sure. If you run that directly in command line does it run?

CedNet commented 9 years ago

Yes it does run then. But aldo adds the NULL file.

bkuhl commented 9 years ago

Thanks @cantecim