Script files on Server (Dreamhost etc) - creating a program to run in a UNIX shell as a CRON job.
Read - you will be BURNT by this!
If, due to editing/updoading, the format changes from Unix to Windows, your files will have a CR/LF as the NEWLINE control characters. Unix only uses LF as the NEWLINE control character.
If you see a ? or /r at the end of a line a CR has been added. These files are confusing and a real pain in the butt to get rid of. Best to edit these files with Notepad++ and make sure that Unix format is selected on the top menu bar - View - Show Symbol - Show End of Line is selected (this shows Line endings in BLACK) on the bottom right bar it should say Unix or Windows or Macintosh - double click to change.
In my experience file transfer programs that claim to handle CR/LF are not reliable.
Make sure that your script file on the server has the execute bit set.
Dreamhost does not email the results of your CRON job, unless there is an error that writes to the console. You need to ensure that your script works before scheduling.
Create your script file(test.sh) for scheduling(CRON)
🏠 Home 👪 Gen 👈 Back 👆 Top