Search the Community
Showing results for tags 'cron'.
Found 2 results
US CRON enabled but doesn't run.
BloodBaz posted a topic in Uniform Server - WindowsHi I'm running UniServer Zero XIII 13.3.2 to run Apache/PHP/MySQL in a Windows Server environment. I've set up the Cron facility under the Extra menu: - Enable/Disable run Cron: Run Cron = CHECKED - Enable/Disable Cron logging: Cron logging = CHECKED Config File: [moodle] start = 2017-09-12 1:00:00 period = hourly path = http://xxx.yyy/moodle/admin/cron.php?password=xxxyyyzzz ref = 1508327224 When I go into Cron and close the box again, the Cron service runs as a *one off* (assuming it was last run over an hour ago) but it does not run hourly from there on e.g. Here is the log file. The timestamps on the "Run OK" entries are when I actually went into the Extra > Cron menu then closed it again. 13/09/2017 12:21:08 ### Log Start =========================================== 13/09/2017 12:29:13 - Run OK --- http://localhost/moodle/admin/cron.php 13/09/2017 13:41:20 - Run OK --- http://localhost/moodle/admin/cron.php 17/10/2017 13:09:49 - Run OK --- http://localhost/moodle/admin/cron.php 18/10/2017 10:48:12 - Run OK --- http://derbylearn.net/moodle/admin/cron.php?password=VC0SJFZj6vefzXmo3 Can anyone explain why my cron isn't running every hour? I'm running my webstack as a service (i.e. via Unifrom Server XIII Service). Thanks, Chris
PHP_SAPI returning different values
MarcusDavis posted a topic in PHPHi and thanks for reading. I have UniserverZ XI working with php 5.5 perfectly for my requirements. Now I want to use a .bat file to perform a Cronjob within my system. The script requires correct settings for PHP_SAPI like this: ...if(PHP_SAPI === "cli"... When I perform echo(PHP_SAPI."\n"); in my script to check what kind of PHP_SAPI the server is using, I get different results: cgi-fcgi when the script is run directly from the browser and "cli" when opened through a .bat file (cronjob). anyway, executing the script with: php -f cron.php from the server console isn't performing the script, nor giving me an error. my only success has been opening the script directly from the browser with PHP_SAPI set to cgi-fcgi. How is this possible and how can I make it work from the bat file too? Any help would be appreciated. Thank you!