Installing Drupal on 4.0-Mona: Difference between revisions
New page: <span id="top"></span> {| cellpadding="2" |__TOC__||'''Installing Drupal on 4.0-Mona''' |} '''Introduction''' This step-by-step guide shows how to install Drupal on Uniform Server 4.0-Mon... |
No edit summary |
||
(6 intermediate revisions by the same user not shown) | |||
Line 175: | Line 175: | ||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
=== run_cron.bat === | === run_cron.bat === | ||
This batch file uses '''unidelay.exe''' to provide a periodic tick. At the end of each delay PHP is run in CLI mode and runs script run_cron.php. | This batch file uses '''unidelay.exe''' to provide a periodic tick. At the end of each delay PHP is run in CLI mode and runs script run_cron.php. | ||
UniServer\'''run_cron.bat''' | UniServer\'''run_cron.bat''' | ||
<pre> | <pre> | ||
@echo off | |||
rem ################################################### | |||
rem # Created By: MPG (ric) | |||
rem ################################################### | |||
rem ## create a temp file with value run | |||
(set /p dummy=run) >temp.txt <nul | |||
rem ##cron loop | |||
:next | :next | ||
udrive\home\admin\program\unidelay.exe 60 | udrive\home\admin\program\unidelay.exe 60 | ||
udrive\usr\local\php\php.exe -n udrive\www\drupal\run_cron.php | udrive\usr\local\php\php.exe -n udrive\www\drupal\run_cron.php | ||
goto :next | |||
rem ## read file value | |||
SET /P stop=<temp.txt | |||
rem ## repeat cron loop if set to run | |||
if %stop%==run goto :next | |||
rem ## not set to “run” clean-up and exit | |||
del temp.txt | |||
exit | exit | ||
</pre> | </pre> | ||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
=== run_cron_hidden.bat === | === run_cron_hidden.bat === | ||
The above batch file if run directly would be visible hence this batch file uses '''uniserv.exe''' to run the above hidden. | The above batch file if run directly would be visible hence this batch file uses '''uniserv.exe''' to run the above hidden. | ||
Line 199: | Line 217: | ||
'''''Note 1'':''' '''unidelay.exe 60''' runs the cron-job every 60 seconds increase this as required. | '''''Note 1'':''' '''unidelay.exe 60''' runs the cron-job every 60 seconds increase this as required. | ||
'''''Note 2'':''' You can run Cron from '''Server_Start.bat''' add the following line just below line ''': | '''''Note 2'':''' You can run Cron from '''Server_Start.bat'''; add the following line just below line ''':NOTFOUND''': | ||
<pre> | <pre> | ||
echo. | |||
echo Starting Drupal cron ............... | |||
echo. | |||
start udrive\home\admin\program\uniserv.exe run_cron.bat | start udrive\home\admin\program\uniserv.exe run_cron.bat | ||
</pre> | </pre> | ||
Hence every time you start the servers using '''Server_Start.bat''' or '''disk_start.vbs''' Cron will run. | Hence every time you start the servers using '''Server_Start.bat''' or '''disk_start.vbs''' Cron will run. | ||
'''''[[#top | Top]]''''' | |||
=== stop_cron.bat === | |||
When you stop the servers, you'd also want to stop the unidelay process. The file temp.txt is used to break the loop. After killing unidelay.exe the file content is checked; if a value other than "run" is found it breaks the loop in run_cron.bat. | |||
UniServer\'''stop_cron.bat''' | |||
<pre> | |||
rem ## update temp file to stop | |||
(set /p dummy=stop) >temp.txt <nul | |||
rem ## kill off cron | |||
udrive\home\admin\program\pskill.exe unidelay.exe c | |||
exit | |||
</pre> | |||
Alternatively, the two lines in stop_cron.bat can be placed in Stop.bat; add them just below line ''':END'''. | |||
'''''Related links'':''' | '''''Related links'':''' | ||
Line 212: | Line 251: | ||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
== Portability == | == Portability == | ||
If you want a portable version of Drupal copy the folder '''UniServer''' and all its content to your USB memory stick that’s it. Don’t expect fantastic speeds however it is usable. | If you want a portable version of Drupal copy the folder '''UniServer''' and all its content to your USB memory stick that’s it. Don’t expect fantastic speeds however it is usable. |