Running a PHP Script from a Cronjob

I’ve googled this with Virtualmin as a keyword and read all the answers that I can find. I am hoping for some specific advice here as I have a specific problem that I can’t solve from what I found on Google.

I need to run this script “/home/bbcurve/public_html/c/getcities.php” every two hours. Before I knew any better, I just listed it in Virtualmin GUI as shown in the attachment. I soon learned that this isn’t directly possible on my Centos VPS.

I’ve figured out the correct way to run this job from the command line is:

crontab -e, put “i”

  • */2 * * * /usr/bin/php /home/bbcurve/public_html/c/getcities.php
    :x -> Esc

Please can I get some help on how to translate this into what I put into the boxes in the Virtualmin Gui?

Thanks.

Here is the attachment that I don’t seem to be able to attach to the first post

Howdy,

Although I wouldn’t recommend running it as root, I’d suggest using the Virtual Server owner – the rest of that looks good.

Are you having a problem of some sort, executing that PHP script?

If you are having some sort of problem – what happens if you run that PHP script manually from the command line, does that work without any errors?

-Eric