Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to rig up a really ghetto cron job. I'm hosting a site on shared hosting (can't afford dedicated), and I need to use cron for some stuff on it. The problem is obviously cron stuff is not allowed. The possible solution is: my Windows computer is always on.

My question is: what would be the best way to write a script to automatically run commands on the server (which is a Linux server)? Are there any good Windows programs out there that will connect to the server and run the needed commands from a file?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Assuming when you mean "run commands on the server," you have SSH/Telnet access, Putty can do this.

putty.exe [-ssh | -telnet] [user@]host -m C:/Scripts/MyRemoteScript.txt

It will run the remote script and close the PuTTY window.

You can schedule this process and it should run on a regular basis. I suggest using RSA authentication / Auto login with this in a saved session.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.