Post by AldoP » Sun Apr 14, 2024 12:11 am

Hello, in the admin panel of opencart ( 4.0.2.3 ) I can edit and delete a cron job, but there isn't a 'create' button.

of course I can add a php file in the 'catalog/controller/cron' folder, and this file will be my cronjob, but I want to add it by admin panel, or better, I want to add a cronjob installing a new extension.

I seen there is a 'addCron' method in Opencart\Admin\Model\Setting.... but where this method is called ?

So can I add a cronjob by panel or by a new extension ?

How I can do it ?

Newbie

Posts

Joined
Tue Sep 11, 2012 4:17 am

Post by straightlight » Sun Apr 14, 2024 8:12 am

AldoP wrote:
Sun Apr 14, 2024 12:11 am
Hello, in the admin panel of opencart ( 4.0.2.3 ) I can edit and delete a cron job, but there isn't a 'create' button.

of course I can add a php file in the 'catalog/controller/cron' folder, and this file will be my cronjob, but I want to add it by admin panel, or better, I want to add a cronjob installing a new extension.

I seen there is a 'addCron' method in Opencart\Admin\Model\Setting.... but where this method is called ?

So can I add a cronjob by panel or by a new extension ?

How I can do it ?
By a new extension.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by AldoP » Mon Apr 15, 2024 3:16 pm

ok, if I want to create a new extension, and install it by uploading a zip file. Have I to add a catalog/controller/cron folder in the extension structure ? and just have I to add a php cron file in that folder ? and how the cron will be registered in the cron table of the database ? in the documentation there isn't nothign about that

Newbie

Posts

Joined
Tue Sep 11, 2012 4:17 am
Who is online

Users browsing this forum: No registered users and 2 guests