(#11764) Fix cron jobs for passing block to method
Fixing the run_x_on methods to accept a passed block causes the
cron resrouce tests to fail. Minor fixes to regex and asserts
fix the issue.
This affect all versions of puppet and should be merged up.