Further to Richard and Davo's suggestions, once you have a local development environment set up, you could also consider writing some automated tests with PHPUnit.
This allows you to set up some test data that looks like the data your code will actually use, execute the scheduled task for your plugin, then examine the data programmatically to make sure your code did what you were expecting. The big advantage to doing it this way is that when you change your code in the future (or upgrade the underlying Moodle installation), you can make sure you don't accidentally break existing behaviour.