Cron job not working / can't cd

In an application I installed it said I should create a cron job with this command. In the hestiacp I put this in it
cd /home/username/web/ && php artisan schedule:run >> /dev/null 2>&1

however this doesn’t work and I get emails saying
/bin/sh: 1: cd: can’t cd to /web/

As root, show the output of these commands (replace YourUser and YourDomain with the actual data):

crontab -l -u YourUser
namei -mo /home/YourUser/web/YourDomain/public_html/

can’t seem to get the command to work

crontab: invalid option – ‘m’

crontab: usage error: unrecognized option

usage: crontab [-u user] file

crontab [ -u user ] [ -i ] { -e | -l | -r }

(default operation is replace, per 1003.2)

-e (edit user’s crontab)

-l (list user’s crontab)

-r (delete user’s crontab)

-i (prompt before deleting user’s crontab)

Those are two different commands:

crontab -l -u YourUser
namei -mo /home/YourUser/web/YourDomain/public_html/

Output for


[email protected]
CONTENT_TYPE="text/plain; charset=utf-8"

Output of namei command

f: /home/user/web/
 drwxr-xr-x root root     /
 drwxr-xr-x root root     home
 drwxr-x--x user user     user
 drwxr-x--x root user     web
 dr-xr-x--x s user
 drwxr-x--x user www-data public_html

Accidentally suspended the cron job. One second

1 Like


Is that screenshot filtered by the CIA? :stuck_out_tongue:

Did you realize that Home is capitalized and it shouldn’t?

1 Like

Yeah, I tried it without capital. but the cron job didn’t seem to work. @sahsanu

How can I check if the cron jobs are working?

I’m following a tutorial for a help center site. Heres the link. It’s supposed to pipe emails into tickets. a

If you are not receiving error mails from cron, that means that it is not failing (at least not as it did earlier).

I don’t know what php artisan schedule:run does, neither if it outputs something but…

1.- If you know what it does, maybe you could see the results inside that web application.

2.- Remove temporarily >> /dev/null 2>&1 from the cron command and check if you receive any mail.

1 Like