Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Error Running Cron Command

Nexyo Soluções Inteligentes   ( User )

Commented 5 years ago

When I try to execute the commandcron  php /home/my-directory/public_html/artisan schedule:run


I get the following error in my email:


In UrlGenerator.php line 101:  Type error: Argument 2 passed to Illuminate\Routing\UrlGenerator::__constru    ct() must be an instance of Illuminate\Http\Request, null given, called in     /home2/gestaotop10/public_html/vendor/laravel/framework/src/Illuminate/Rout    ing/RoutingServiceProvider.php on line 64                       


            X-Powered-By: PHP/7.3.6Content-type: text/html


Note: Invoices are not being generated automatically.

Denis Dulici   ( Admin )

Commented 5 years ago

Hello Nexyo,


Please, make sure you're using the latest version of Akaunting.


Regards

Nexyo Soluções Inteligentes   ( User )

Commented 5 years ago

Hello,


I'm using Version 1.3.17.


I think it's the latest version.

Denis Dulici   ( Admin )

Commented 5 years ago

Hello,


Make sure that the content of the following file is the same:


https://github.com/akaunting/akaunting/blob/master/config/filesystems.php


Regards

Nexyo Soluções Inteligentes   ( User )

Commented 5 years ago

Hello, Denis!


I checked and replaced filesystem.php by what was in github, even then the error persisted.


I decided to change the command using php5-cli / home2 / gestaotop10 / public_html / artisan schedule: run


and now it is not presenting an error, but it does not execute the cron and I receive the following message in the email:


No scheduled commands are ready to run.


Regards

Jaime Bula   ( User )

Commented 5 years ago

Same Here


In UrlGenerator.php line 101:

Type error: Argument 2 passed to Illuminate\Routing\UrlGenerator::__constru
ct() must be an instance of Illuminate\Http\Request, null given, called in
/home/legaloco/contabilidad.simplebunny.com/vendor/laravel/framework/src/Il
luminate/Routing/RoutingServiceProvider.php on line 64


Content-type: text/html; charset=UTF-8

Has someone been able to solve this?

Jeff Wong   ( User )

Commented 3 years ago

In case anyone still looking for the solution:

You should use php.exe instead of php-cgi.exe, like this

"C:\Program Files\PHP\v7.4\php.exe" -f "C:\YourAkauntingPath\artisan" "schedule: run"
"C:\Program Files\PHP\v7.4\php.exe" -f "C:\YourAkauntingPath\artisan" "recurring:check"

However, I'm having the problem when receive the email notification, the link of invoice become "http://localhost...". If I login to the system and send invoice from there, the link will be my actual hostname.
Hope you could share me your solution too. Thank you.

Please login or register to leave a response.

Showing 1 to 7 of 7 discussions