How to auto run a search plugin, doing a different search every hour?
-
We know that we can launch scripts, files of various extensions through scheduling means, with resources such as wp cron, or directly by the linux cron job, where most of the applications are based to take some action.
?But I have an old doubt …
?
??I have a plugin that like most plugins, owns your page in wordpress dashboard??And in this your page, there are elements necessary to execute the action that the plugin was proposed to do:
??An import plugin, which has on your page, these 3 elements:
??A search bar to promote a search (obviously we must auto fill with the value that refers to the type of content we want to import to each hour),
??A search button.
??An import button.
??Then this page has the name of page.php inside the plugin folder .. how would I do to perform this action in the plugin?
?I always modify my preferred plugins, leave checked by default, those questions that I’m used to using on all websites, a form for example, I open the plugin zip and search for the words using grep via command line, and always find in the code, those Plugin options that I usually check or uncheck or leave pre-filled fields by default. How much I install the plugin, it already is how I like it ??
?But of course I will not fill the plugin page with a single value, if I want it to fire every hour with a different search, let’s say I want 24 different searches, one for each hour of the day (60 Minutes in cron).
??How is this done? Should we create 24 .php files inside the plugin folder, and call the page.php plugin file and have those fields filled with the different word of each subject that we should fetch in each hour? How does this work?
??Every 60 minutes, a different file will come with a different keyword in the plugin and click search on the import button? Or will the file call the function of the plugin and to auto-fill these fields from our own files.php? I have no idea how this works!
- The topic ‘How to auto run a search plugin, doing a different search every hour?’ is closed to new replies.