I recently needed to integrate an already existing system into a new server.
When approaching scheduled tasks and cron tasks, the previous developer would run on their server a custom cron (lets call it "Sync1.php").
I added a cron task on my own server for Sync1.php and added a task for the default Moodle cron.php
And now i notice that the code in Sync1 is executed after the cron task for it is run, and a second time when the default Moodle cron.php is run
After further investigation i found that in the list of scheduled tasks in Moodle there is another task that seems to be for the same Sync, but is named differently (lets call it Sync2) and after looking in the code for the whole Moodle system i wasn't able to find Sync2 as a class (from my understanding you need to define it as a class inheriting the "scheduled_task" class)
How come the default Moodle cron.php file knows to run my Sync1?
What is the meaning of Sync2 if there is no class defined for it in the system?