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 though a php file
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
cron job randomly once a day
Moderator: General Moderators
Re: cron job randomly once a day
write a php script to do the randomization and call it every hour
Re: cron job randomly once a day
I trying this to opening registrations..
How can edit to close registrations after 1 hour
Thank you in advance
<?
set_time_limit(0);
sleep(rand(0, 86400));
/*
my spesify code here
*/
?>
How can edit to close registrations after 1 hour
Thank you in advance
<?
set_time_limit(0);
sleep(rand(0, 86400));
/*
my spesify code here
*/
?>