Skip to content
Advertisement

Directory: Is a directory

I’ve set up a cron job to run a Python script to scrape some web pages.

/etc/crontab

JavaScript

However, the emails are informing me that…

/bin/bash: /usr/bin: Is a directory

When I manually run the script, it pipes data into my database, but when the cron job executes the script, nothing…

What does the /bin/bash: /usr/bin: Is a directory message allude to?!

Advertisement

Answer

As discussed in comments the very initial error is that the entry places /usr/bin where the executable should be:

JavaScript

Once fixed to be scapy, the ultimate issue is that scrapy is in /usr/local/bin which is not in your PATH. To change this:

JavaScript

And then you should be able to just do:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement