Link to home
Create AccountLog in
Avatar of ahmettiryaki

asked on

Crontab doesn't work

Errors below are on the logs.

dsn=2.0.0, status=sent (delivered to mailbox)
Jan  3 12:32:01 ubuntu postfix/qmgr[8039]: 8900D291A2FC: removed
Jan  3 12:32:06 ubuntu crontab[15790]: (root) LIST (root)
Jan  3 12:33:01 ubuntu CRON[15792]: (root) CMD (lynx -dump
Jan  3 12:33:01 ubuntu CRON[15791]: (CRON) error (grandchild #15792 failed with exit status 127)
Jan  3 12:33:01 ubuntu postfix/pickup[15581]: 959BB291A2FD: uid=0 from=<root>
Jan  3 12:33:01 ubuntu postfix/cleanup[15637]: 959BB291A2FD: message-id=<20130103103301.959BB291A2FD@ubuntu>
Jan  3 12:33:01 ubuntu postfix/qmgr[8039]: 959BB291A2FD: from=<root@ubuntu>, size=526, nrcpt=1 (queue active)
Jan  3 12:33:01 ubuntu postfix/local[15639]: 959BB291A2FD: to=<root@ubuntu>, orig_to=<root>, relay=local, delay=0.13, delays=0.09/0/0/0.04,

Open in new window

Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Gerwin Jansen
Agree with comment above, can you post the CRON entry as well?

Perhaps there are more errors there that we could help you with.
Avatar of Kerem ERSOY


Status 127 means there's a path not found error condition in your script. When executing cron scripts you need to add full path to commands because cron Environment is not the same as your ilogon environment.

Here's a list of exit status codes for cron scripts:

Script Exit Codes

So like I said in the First post. Specify the FULL PATH to lynx
Avatar of ahmettiryaki


I have 3 different tasks, none of them worked.

*/1 *   *   *   *  run1.php
*/1 *   *   *   *  php run2.php
*/1 *   *   *   *  lynx -dump

Open in new window

*/1 *   *   *   * /usr/bin/lynx -dump

Or wherever the lynx binary exists
Hi Ahmet Bey,

Then you need to enter full path for all the commands and any paramaters specifying a file to access.. such as:

*/1 *   *   *   *  /path/to/run1.php
*/1 *   *   *   *  /path/to/php /path/to/run2.php
*/1 *   *   *   *  /path/to/lynx -dump

Open in new window

Thank you all for the answers.

I installed Lynx again and problem solved.