Page 1 of 1

Proper way to set a scheduled admin task

Posted: Thu Sep 05, 2024 11:27 pm
by ValeraBahley
I need to make a script that periodically fetches a JSON and adds some products/categories to the catalog.

I made a controller in admin/ with no view. It can successfully modify the catalog using the built in models, but, from what I understand, since it's an admin extension, even if I don't have any

Code: Select all

$this->user->hasPermission
checks in the class code I must be logged in browser in to call it. Therefore using Cron to periodically call this module with a cURL is suboptimal, if even possible.

Question: should I just make a separate script that connects and modifies the database by itself, or is there a way to utilize built in models?

Thanks in advance.

Re: Proper way to set a scheduled admin task

Posted: Fri Sep 06, 2024 6:40 pm
by paulfeakins
ValeraBahley wrote:
Thu Sep 05, 2024 11:27 pm
Question: should I just make a separate script that connects and modifies the database by itself, or is there a way to utilize built in models?
This question has been asked and answered many times, please always search the forum before posting.

Locking topic.