I'm having a problem with my cron. I'm not sure on how to work it and I was told to come to the forums. I'm wanting to make it so my users on my website are not online 24/7. I'm using software called Oxwall http://www.oxwall.org/. I'm wanting to set it to update instantly so when a user goes offline it shows them offline and when a user goes online it shows them online. From what I was reading this is all I have gotten out of it. I have looked at the Wiki so don't send me a link saying go here.
I put this in the Tab in my control panel called Crontab:
MAILTO="wget -q -O /dev/null http://www.thekillzone.us/ow_cron/run.php"
* * * * * /dev/null http://www.thekillzone.us/ow_cron/run.php
I know I'm not doing this right so could someone help me.
Thanks,
Trevor C.
Cron Help
-
- New to forums
- Posts: 2
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Mon Sep 15, 2014 11:45 am
Re: Cron Help
This is what we use to run php scripts on our web server using cron:
* * * * * lynx -dump http://www.mysite.com/script.php
Lynx is a web browser installed on most linux systems as far as I know.
If that doesn't work, you can do this(make sure you have the exact path to your php file):
* * * * * php /home/username/public/script.php
If you don't want to get emailed the output(these scripts run every minute, prepare for spam if you leave email on), add this to the end of the line: >/dev/null 2>&1
Example:
* * * * * php /home/username/public/script.php >/dev/null 2>&1
If you need alternate times for the script to run(some of mine run every 5 minutes, others hourly, etc) you can google "crontab generator" or just ask here.
* * * * * lynx -dump http://www.mysite.com/script.php
Lynx is a web browser installed on most linux systems as far as I know.
If that doesn't work, you can do this(make sure you have the exact path to your php file):
* * * * * php /home/username/public/script.php
If you don't want to get emailed the output(these scripts run every minute, prepare for spam if you leave email on), add this to the end of the line: >/dev/null 2>&1
Example:
* * * * * php /home/username/public/script.php >/dev/null 2>&1
If you need alternate times for the script to run(some of mine run every 5 minutes, others hourly, etc) you can google "crontab generator" or just ask here.
Not a NFO employee
Re: Cron Help
Thanks for the help!
Much Appreciated
Trevor C.

Trevor C.