Getting cronjobs to work


I'm a webmaster of a website. It currently still runs ELGG 2.x. We are moving to a new environment, where we use Direct Admin. The database and code are copied to the new environment, but I don't get the cron jobs to work. The site is located at , and will stay there.

The old environment was quite confusing, but cronjobs seemed to be addressable like

I tried several locations, files,... in the new environment, where it should be something like ... But whatever I add or remove, the cron job does give messages like

... is a directory
... is a not a file
... is not executable
... you don't have the right permissions.

Our hosting provider can't figure out how to set these cron jobs too.

Suggestions are very welcome!

I know, I will have to bring Elgg to a much more current version too, getting the database to the relevant version. But first: get cronjobs working.

Thanks for reading and responding,


  • Hi Ronald,

    you got the url almost right, it should be etc..

    Have a look at for some more information.

  • I've never used the Direct Admin panel but for our apps running on Elgg 2, we use crontab with this configuration:

    * * * * * /usr/bin/lwp-request -m GET -d &>/dev/null
    */5 * * * * /usr/bin/lwp-request -m GET -d &>/dev/null
    15,30,45,59 * * * * /usr/bin/lwp-request -m GET -d &>/dev/null
    30,59 * * * * /usr/bin/lwp-request -m GET -d &>/dev/null
    @hourly /usr/bin/lwp-request -m GET -d &>/dev/null
    @daily /usr/bin/lwp-request -m GET -d &>/dev/null
    @weekly /usr/bin/lwp-request -m GET -d &>/dev/null
    @monthly /usr/bin/lwp-request -m GET -d &>/dev/null
    @yearly /usr/bin/lwp-request -m GET -d &>/dev/null

    Maybe you just need to create cron intervals and set the above command to get cron running.

    You can also use wget:

    /usr/bin/wget --output-document=/dev/null >/dev/null 2>&1
    /usr/bin/wget --output-document=/dev/null >/dev/null 2>&1

    And even lynx:

    /usr/bin/lynx -source &>/dev/null

    Learn more about Cron.

    Also, look at this plugin.

  • Thanks for your responses.

    I still don't get it to work...
    I found that I can get a PHP-file activated at
    /bin/sh: /home/<USERNAME>/domains/elgg.<OURDOMAIN>.nl/public_html/elgg/<MYPHPSCRIPT>.php
    I had to set permissions for that file, to refrain from getting 'Permission denied'

    However, when I put
    /bin/sh: /home/<USERNAME>/domains/elgg.<OURDOMAIN>.nl/public_html/elgg/cron/minute/
    /bin/sh: /home/<USERNAME>/domains/elgg.<OURDOMAIN>.nl/public_html/elgg/cron/minute
    in a cron job, I get 'No such file or directory'.

    Do I have to set specific rights to a certain file? Do I have to run anything? There is no file nor directory 'cron' in my elgg-directory.

    The server I currently use is not yet available on the internet without redirecting in my hosts-file, but that should not prevent it from working with its own cron jobs, should it?

    Thanks for (more) help...


  • However, when I put
    /bin/sh: /home/<USERNAME>/domains/elgg.<OURDOMAIN>.nl/public_html/elgg/cron/minute/
    /bin/sh: /home/<USERNAME>/domains/elgg.<OURDOMAIN>.nl/public_html/elgg/cron/minute
    in a cron job, I get 'No such file or directory'.

    You need to do a wget

    This is not the same as executing a .php file. Please read the documentation carefully. Or read Nikolai's comment again that does the same as the documentation.

  • Thanks, Jerome Bakker.

    The cron job now gets activated every minute.

    However, the output (send in mail, while testing) says 'Scheme missing'. It does not seem to handle the expected function(s). Do you have any clue where I should look to solve this?