Creating jobs in a plugin

Continuing the discussion from here:

How exactly does one create their own custom job that runs periodically? Is it very difficult to achieve?

Never mind, I found this here: