I have a requirement which needs to be done via cron. Some of the jobs should run only in time frame of 9AM-7PM everyday. So how I can schedule a cron for this type of requirements in the crontab.I surfed around it, but didn't get any solutions so please anybody help me in this regard.
To run cron you have to have something that triggers the cron since php is a scripting language and only fires off when executed. What that means is you either need an outside resources to fire off the cron or you need to set it up server side. You can set up a cron service on linux by following the guide on Drupal.org. If a scheduled cron task is not set up on the server side or some other mechanism then cron will simply run the next time a user goes to your site. This could have performance issues and unreliable cron runs.
If you don't want your cron task to run every single time cron runs then in your code you would set it up to check the current time and whether or not to run. This would require use of the date functions in php and allow you to decide whether or not to execute your code based off the time
Elysia cron will allow you specifically set which cron tasks run at certain times. This will require you to still set up a cron task so that cron can still fire.