I’ve implemented a plugin that fetches game data from my own game database and “converts” these to Grav-Pages. So far so good, but the file_get_contents() function (using cURL makes no difference) takes really long until it’s finished (30sec+) and I can’t do anything to fix this (the problem is afaik the DNS of my shared webhost that I use).
Currently the plugin is attached to the “onPageInitialized” Event Hook and I tried it with “onShutdown” aswell, because I was hoping that the Page is already rendered and usable for the user. But that doesn’t work either.
Actually I don’t really need these event hooks, because it updates the data in the same moment, a user navigates to a “/games/xyz” page and as long as the user does not refresh the page, he won’t see the changes. This behaviour is kind of weird and I was wondering if it’s possible to define a plugin without an event hook that “calls itself” (not sure about the wording, but I hope you know what I mean) like once or twice per day?
WITHOUT using the Scheduler… because I can’t add a user to the crontab with my shared host provider, I can just define some scheduled tasks within the admin panel of my shared host in a “html form” kind of.
I want the plugin structure, because I like the feature to configure the plugin.
Does someone has an idea? Thanks in advance.