Elgg cron job

20/06/2013


It is realy important to setup cron for your elgg based social network. Here is an example of elgg cron for Debian linux server.




# Location of WGET

WGET='/usr/bin/wget'



# Location of your site (don't forget the trailing slash!)

ELGG='http://www.example.com/'



# The crontab

* * * * * $WGET --spider ${ELGG}cron/minute/

*/5 * * * * $WGET --spider ${ELGG}cron/fiveminute/

15,30,45,59 * * * * --spider $WGET ${ELGG}cron/fifteenmin/

30,59 * * * * --spider $WGET ${ELGG}cron/halfhour/

@hourly $WGET --spider ${ELGG}cron/hourly/

@daily $WGET --spider ${ELGG}cron/daily/

@weekly $WGET --spider ${ELGG}cron/weekly/

@monthly $WGET --spider ${ELGG}cron/monthly/

@yearly $WGET --spider ${ELGG}cron/yearly/

@reboot $WGET --spider ${ELGG}cron/reboot/




This cron jobs are for Debian linux server, you can add it with crontab -e command. There may be diffrence in other linux distributions. Default behavor of wget is to download page so we have to insert --spider command for wget to just request page instead of downloading.