Cron job error: could not open input file

It seems I have correctly installed osTicket on my Dreamhost site but am having trouble with the setup. For the setup process I followed this tutorial for setting up a cron job on Dreamhost for osTicket:…-for-os-ticket

During the setup I chose have an email sent to me on the status of the cron job.
Every time the cron job executes I get the following message (I have changed the items in red to keep from putting my actual information on the web):

[quote]Subject: Cron <[color=#FF0000]signinname@something[/color]> /usr/local/bin/setlock -n /tmp/cronlock.569258.121550 sh -c $’/usr/local/php5/bin/php /[color=#FF0000][/color]/support/api/cron.php’ (failed)

Could not open input file: /[color=#FF0000][/color]/support/api/cron.php[/quote]

What’s going on?

On another post on this forum I found, sdayman said:

[quote]Are you sure you’re running cron as the user that owns the file?

Is there any more part of the error? I often see that error because myfile.php is trying to read from some other input file that’s causing the problem.[/quote]

But I really have no idea what that means.


Perhaps you need to change the working directory to that of the PHP file first or specify the absolute path to the PHP file.

You pegged it! It turns out that the absolute path to the PHP file is not just / It is actually /home/shell account user name/ This article is good on setting up an osTicket cron job in Dreamhost ( but it lacks that little bit of information.

For anyone else with this confusion:
In Dreamhost Panel, click on “Manage Users” in the Toolbox and then click “Edit” next to the user from which you want to know the information. On the table you will see “Home Directory.” /home/aaaa (The aaaa is actually your user director on the server.)

Knowing that information, you add your domain folder and then the rest of the path to cron.php. The end result is:
/home/user directory/*

*All of this assuming that you installed osTicket in a “support” directory that you created during the installation process. If this is not so then adjust your information accordingly.