Jump to content

Erreur while executing custom Command


Recommended Posts

Hi !

 

I want to create a cron job within my Prestashop instance. I heard about the Symfony Scheduler but it's looks like it is complicated (impossible) to implement in a module ? Let me know if this is possible.

But instead I tried to implement a Command, something that is documented . But when I try to run my command I get with :
 

./bin/console mymodule:my-command

I got the following error :
 

PHP Fatal error:  Uncaught Error: Class "PrestaShop\PrestaShop\Core\Version" not found in /var/www/html/mypresta/config/autoload.php:3

I don't get what I am doing wrong ?

I'm on PHP 8.1.27 and Prestashop 8.1.3 running on an Ubuntu instance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...