Cron job randomly once a day

I want to create a cron job randomly once a day for my site's registration.
The responsible file for registrations is a config file and I need to change the contents
twice on day (on and off)
I know the way for random cron job for example

*/n * * * * /usr/local/bin/php /home/user/domain.com/cron.php >/dev/null 2>&1(registrations on)

but i don't know how to change the values after one hour to normall (registrations off)..
Any suggestions on this>??
Sorry for my bad English
Thank you in advance

maybe use the " at " command instead ?

To get some help about how to use the at command enter this :
man at | less

What OS do you have? -- simply using at will start a job, but you have to give it offset times, and those vary a little by OS. Plus you may have to edit files named like cron.deny or cron.allow depending on what you a really trying to do.

I have Ubuntu 10.10..I have a half solution..lol
This is the commant on crontab for randomly hour once a day

*/n * * * * /usr/local/bin/php /home/user/domain.com/cron.php >/dev/null 2>&1(registrations on)

for openning registrations..But I need one cron job more to stop the previus (to change the config file again in normal mode after 1 hour--registrations off--)
I m trying with this php cron script but is not correct..Please help me with this script

<?
    set_time_limit(0);
    sleep(rand(0, 86400));
    /*
  my spesify code here
    */

    ?>

Thank you in advance

You can simply generate a random number each day (with one crontab file that runs only once at the beginning of the day) that corresponds to the number of minutes (or 5 minute intervals) each day, and write that number to a file.

Then, you have a second crontab file that reads the random number in the file and checks against the time and executes if there is match.

If you are using PHP, you can also try to use PHP shared memory, or you could use an environmental variable to hold the daily random number. There are many ways to do this.

---------- Post updated at 04:38 ---------- Previous update was at 04:34 ----------

While it is possible to set something up with the at command, the original poster asked for a crontab solution.

This is easily done with cron, as requested by the original poster.

(See my post above)

nice thinking...Thank you ..But i m noob...Lets see
At first I will create one crontab like this

*/n * * * * /usr/local/bin/php /home/user/domain.com/cron.php >/dev/null 2>&1 /tmp/regon.log(registrations on)

What is the next crontab to check this file..I do not know..Which is the cron command to spy this file and calculate one hour????.Please give me an example..Thank you...