This is really basic, I've been looking everywhere for an answer, but I have no knowledge of linux scripting whatsoever.
What I want to do is run a command through a cron run on my linux server. The command is:
drush -u admin -d rets-import
I have a script called retsimport.sh in my folder /bin/sh.
When I run the command through a command line, it works perfectly, but when it gets executed from the sh file, it gives me a command not found. The content of my script is the following:
Code:
#!/bin/sh
cd
cd public_html/exitrealty
pwd
drush -u admin -d rets-import
pwd
I have a cron job set up, I tried a few commands, but to be honest, I have no clue what to put exactly, so I've tried bash retsimport.sh, bash ./retsimport.sh, sh retsimport.sh and a lot more, I just can't figure it out.
Help would be really appreciated, and I'm sorry if I duplicate from somewhere else, like I said, looked everywhere, I just don't get anything about this.