Skip to main content
Code sample for daily once run.
Source Link
szenbalu
  • 193
  • 1
  • 4
  • 11

If you have the root permission you can try this way.

* 22 * * * /root/sbin/allDomainsCron.sh 

Where allDomainsCron.sh contains your domains cron.php one by one:

#!bin/bash php /var/www/domain1/cron.php php /var/www/domain2/cron.php php /var/www/domain3/cron.php php /var/www/domain4/cron.php ... 

So you can ensure that only one cron.php run at a time.

If you would run the script once a day at 22:00 this code will do the work:

0 22 * * * /root/sbin/allDomainsCron.sh 

If you have the root permission you can try this way.

* 22 * * * /root/sbin/allDomainsCron.sh 

Where allDomainsCron.sh contains your domains cron.php one by one:

#!bin/bash php /var/www/domain1/cron.php php /var/www/domain2/cron.php php /var/www/domain3/cron.php php /var/www/domain4/cron.php ... 

So you can ensure that only one cron.php run at a time.

If you have the root permission you can try this way.

* 22 * * * /root/sbin/allDomainsCron.sh 

Where allDomainsCron.sh contains your domains cron.php one by one:

#!bin/bash php /var/www/domain1/cron.php php /var/www/domain2/cron.php php /var/www/domain3/cron.php php /var/www/domain4/cron.php ... 

So you can ensure that only one cron.php run at a time.

If you would run the script once a day at 22:00 this code will do the work:

0 22 * * * /root/sbin/allDomainsCron.sh 
Source Link
szenbalu
  • 193
  • 1
  • 4
  • 11

If you have the root permission you can try this way.

* 22 * * * /root/sbin/allDomainsCron.sh 

Where allDomainsCron.sh contains your domains cron.php one by one:

#!bin/bash php /var/www/domain1/cron.php php /var/www/domain2/cron.php php /var/www/domain3/cron.php php /var/www/domain4/cron.php ... 

So you can ensure that only one cron.php run at a time.