Script files on Server (Dreamhost etc) - Dwyne (Dwine) Genealogy & Personal Site
🏠 Home 👪 Gen 👈 Back 👆 Top

Script files on Server (Dreamhost etc) - creating a program to run in a UNIX shell as a CRON job.

Read First- 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 keep all script files in a separate directory 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.

Crontab is suppose to email only if there are errors that write to the console. In my experience this is not reliable, you need to check! You need to ensure that your script works before scheduling.
You may notice the "DREAMHOST BLOCK" which is added to all script files, it contains the MAILTO var, it's the email you entered on the scheduling page.

Notes on running script files on (currently Ubuntu Linux) from Windows.
Your script files are on your server, they are scheduled to run via the Dreamhost web interface. Editing of the script files is best done on your local/personal computer system then uploaded(FileZila) to dreamhost

Create your script file( for scheduling(CRON)

Note Cron jobs on dreamhost are limited to 1000 characters - not very much.

Tools Used

🏠 Home 👪 Gen 👈 Back 👆 Top