If you want to run X times a day, set your crontab entry to:
0 */X * * * command_to_run
where X is the hourly interval you want to fire your job on to get the desired number of executions/day. For instance, use 2 to fire off every two hours for a total of 12 executions/day.
In your code use this at the top to force it to sleep a random time up to that cron interval:
# How long the program takes to run, in seconds. Be liberal unless having
# two instances running is OK.
EXECUTION_TIME = 10
INTERVAL = 2 * 60 * 60 - EXECUTION_TIME
sleep(rand(INTERVAL))
The idea is that cron will start your program at a regular interval, but then it will sleep some random number of seconds within that interval before continuing.
Change the value for EXECUTION_TIME to however long you think it will take for the code to run, to give it a chance to finish before the next interval occurs. Change the "2" in the INTERVAL to whatever your cron interval is.
I haven't tested this but it should work, or at least get you on the right path.