Cron scripts
« on: April 08, 2009, 04:36:10 PM »
Hi, on one of our hosts they do not allow the editing of crontab.

When logged in with (almost full permissions)

The command /usr/bin/php /home/staylor/domain.co.uk/generator/runcrawl.php works and run's the crawl.
(note /usr/bin/php was changed to get it working)

So we can request the host to add a cron script to the crontab.
i.e.
a file called generatorscript

that contains

#!/bin/bash
/usr/bin/php /home/staylor/domain.co.uk/generator/runcrawl.php
/usr/bin/php /home/staylor/domain1.co.uk/generator/runcrawl.php
/usr/bin/php /home/staylor/domain2.co.uk/generator/runcrawl.php

But the host says the script is not setup properly. What do I need to change #!/bin/bash to?
or do I need to change /usr/bin/php to something else? /usr/local/bin/php didnt work when input directly into the command prompt.

Thanks,

Rob.
Rob
Re: Cron scripts
« Reply #1 on: April 08, 2009, 11:58:10 PM »
Hello,

in case if "/usr/bin/php /home/staylor/domain.co.uk/generator/runcrawl.php " works when enetered manually in command line, then this part is ok.
You can try changing "#!/bin/bash" with "#!/bin/sh".

You can also ask the host what exactly they meant by "the script is not setup properly".