Path to get

jcolburn

New Member
Messages
3
Reaction score
0
Points
0
what is the path to "get"?


Let me explain a little,.. I've just installed Elgg,..

Here is step 4 to the installation:
Code:
4. Install your crontab (UNIX ONLY)

Cron is a UNIX command which allows programs to be run at set 
times of the day.

If you want to take advantage of some of the maintenance 
functions such as log rotation or garbage collection, you must 
install a cron tab to trigger these events.

We have provided an example crontab as /crontab.example. Edit this 
with a text editor to provide the details of your site, rename it
to another filename (eg 'crontab.mine') and install it with the 
following command:

   			crontab crontab.mine 
   			
Substitute your filename for 'crontab.mine'.

Here's crontab.example:
Code:
# Crontab example.
#
# This file is an example of triggering Elgg cron events. Modify and register events 
# as appropriate.
#
# See http://docs.elgg.org/wiki/Cron for more information
#
# @author Marcus Povey

# Location of GET (see: http://docs.elgg.org/wiki/What_is_get)
GET='/usr/bin/GET'

# Location of your site (don't forget the trailing slash!)
ELGG='http://www.example.com/'

# The crontab
# Don't edit below this line!
@reboot $GET ${ELGG}pg/cron/reboot/
* * * * * $GET ${ELGG}pg/cron/minute/
*/5 * * * * $GET ${ELGG}pg/cron/fiveminute/
15,30,45,59 * * * * $GET ${ELGG}pg/cron/fifteenmin/
30,59 * * * * $GET ${ELGG}pg/cron/halfhour/
@hourly $GET ${ELGG}pg/cron/hourly/
@daily $GET ${ELGG}pg/cron/daily/
@weekly $GET ${ELGG}pg/cron/weekly/
@monthly $GET ${ELGG}pg/cron/monthly/
@yearly $GET ${ELGG}pg/cron/yearly/

I know '/usr/bin/get' won't work,.. cuz cron is blow`n up my mail box,..

Edit:
After having over 700 new email messages from cron:

Untitled-2.jpg


Im obviouly removing my cronjobs for the moment.
But, I really could use some help here,..
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Unix commands are case sensative. It is GET, not get.

Not sure if they have it enabled. All it does is grab a webpage. Since your cronjobs are not using the page, you could just substitute a php or perl script that retrieves the page/script (I assume that the page you are retrieving is doing the real cron job).

You have one listed to run every minute. I think the admins do not want them to run that often.

Crons We allow crons but they can not call a script hosted somewhere else and you must not have more than 1 running every 5 minutes.
 
Last edited:

jcolburn

New Member
Messages
3
Reaction score
0
Points
0
I'm aware that GET != get. I've tried /usr/bin/GET, it didn't work either. So, I figure it's a path error. I've also tried both get & GET without a path.

I know what GET does. I'm not familiar with its syntax, as I usually use wget.

I was unaware of x10's stance on cronjobs. Thank you for that tidbit of info.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Sorry, did not mean to get pedantic.

Apparently GET not on the system (at least not in /usr or /bin paths) but

/usr/bin/wget

is.
 

jcolburn

New Member
Messages
3
Reaction score
0
Points
0
Shorly after my last post, I decided to use wget. It works well.

For those who dont know and are interested, this is what I did & why.

My current cronjobs look simular to this:
Code:
*/5 * * * * wget --quiet --output-document=/dev/null http://www.joecolburn.co.cc/pg/cron/minute/
*/10 * * * * wget --quiet --output-document=/dev/null http://www.joecolburn.co.cc/pg/cron/fiveminute/
*/15 * * * * wget --quiet --output-document=/dev/null http://www.joecolburn.co.cc/pg/cron/fifteenmin/
30,59 * * * * wget --quiet --output-document=/dev/null http://www.joecolburn.co.cc/pg/cron/halfhour/
0 * * * * wget --quiet --output-document=/dev/null http://www.joecolburn.co.cc/pg/cron/hourly/
0 0 * * * wget --quiet --output-document=/dev/null http://www.joecolburn.co.cc/pg/cron/daily/
0 0 * * 0 wget --quiet --output-document=/dev/null http://www.joecolburn.co.cc/pg/cron/weekly/
0 0 1 * * wget --quiet --output-document=/dev/null http://www.joecolburn.co.cc/pg/cron/monthly/
0 0 1 1 * wget --quiet --output-document=/dev/null http://www.joecolburn.co.cc/pg/cron/yearly/

I changed the run times to conform to x10Hosting's cron rules (thanks Descalzo, I was compleatly unaware of that rule).

I used the following options:

--quiet
When used at the command line, wget prints on the screen, as a cronjob the standard output gets sent to your email. With this option, the standard output gets turned off completely, so you dont get any e-mails from it.

--output-document=/dev/null
"--output-document=" changes the name of the file downloaded to what or where ever you choose. I used /dev/null so I dont have a root directory full of index.html.###

For more information on wget you can get the manual here.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Interesting way to run cron jobs. But it looks like a possible headache/security problem if someone/thing started requesting those pages over the web.

Add: If it becomes a problem, perhaps password protect the directory and then use the wget options:

‘--http-user=user’
‘--http-password=password’
 
Last edited:
Top