Best place to register a scheduled task
i am sure i am being incredibly dim here but for some reason i can't figure it out this morning. I have created a website in Runway, all working great but the last task is to integrate Instagram in such a way that it pulls the posts into a feed of posts which is mixed in with other posts that they create from within the perch admin.
My thinking has always been to create a scheduled task that would run and grab the Instagram posts and add them to the perch database programatically, which looking at the perch scheduled tasks setup is still the way to go but i can't seem to understand the process of setting up the task or the best place to register it. Is it just the case of registering a init function that does the rest of the work, so registering a function called 'import_instagram_posts' for example
PerchScheduledTasks::register_task('perch_instagram', 'post_instagram_post', 1, 'import_instagram_posts');
Is there a preferred place to do this as well? the examples i have found all seem to sit in a dedicated app, and at this stage as this requirement is quite specific seems like overkill to create one, but i am sure i am just being dim as i said and missing the obvious.
Any advice would be greatly appreciated.