Phpservermon: Feature request: Possible to run cronjob via web

Created on 26 Jun 2015  路  9Comments  路  Source: phpservermon/phpservermon

I made it possible to execute the cronjob by removing the following from cron/status.cron.php

if(!psm_is_cli()) {
    die('This script can only be run from the command line.');
}

It seems to run perfectly fine.

I do understand the reasons not to have this publicly accessible, but ask that you add a possibility to enable/disable this (and just leave it disabled as default).

enhancement good first issue help wanted

All 9 comments

Good idea, we are accepting PR.

I dont really understand why you need that. You have the Update button that does the same thing.

To be Able to run "http cron" on share hosting servers

:+1:

Hi,
my workaround:

Create a file execute.php (or something else) in the cron folder:
nano execute.php

and fill it with:

<?php
exec('php /FOLDERS/TO/phpservermon/cron/status.cron.php');
?>

now execute

http://yourdomain/cron/execute.php

Create a file execute.php (or something else) in the cron folder:

If the purpose of this was to run a cron over http on shared hosting servers, this wouldn't help because 99% of shared hosting servers will have exec() disabled, and if it doesn't, you have bigger problems...

@Jonchun If exec() is enabled it will work, my shared host provider has exec() enabled...

358 may very well be what you are looking for.

Resolved by #358 thanks @pieter-groeneweg

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmonaay picture dmonaay  路  7Comments

av2k picture av2k  路  10Comments

pieter-groeneweg picture pieter-groeneweg  路  3Comments

nitrocode picture nitrocode  路  10Comments

ptrj picture ptrj  路  3Comments