renamed cron_reduction to make a testable class.
Refactoring code to use phptunit test. Writing test to main function.(OMS-520)