Execution problem with crom for monthly

I have to setup cron job for monthly and the month may be 30 or 31

Thanks,

man cron

on what date you want it to be scheduled?

0 6 28 * * /a/b/myscript.ksh

this will execute the script at 0600 Hrs on 28th of each month.

If you'd have used the search box in the top right corner and searched for "cron last day month", you'd have seen that this question has been asked, and answered, in 2005 already, with follow-ups in the same thread for 2007 and 2009.