batch file - Poor man's remote job execution in windows 7 using job scheduler -


OK, I know that my title is a bit unclear but let me explain what I did and what I wanted to do To fail to do

First of all, security is not my concern at this time. Once I work on it, I will apply an authentication schema to protect my setup.

I want my windows at home, a batch file from a Linux server on the client, a batch file (non-VPS-Root user to play the role of FTP / SCP server) and download it Run it as it runs, run it.

I setup a non-privileged (read as non root) accounts on my vps I created a public / private key pair Using my key-pair from my windows pc, I could log in to my VPS without the need of password. Using the same key-pair, I was able to download a window from my VPS to a Windows machine.

I have a batch file that I have set to run every 3 minutes using the windows internal task scheduler. The batch file does this:

  scp remote-server: /home/user1/job.bat. Job.bat & gt; Outfile.txt scp outfile.txt user1 @ remote-server: /home/user1/outfile.txt echo "reamed" & gt; Job.bat scp job.bat user1 @ remote-server: /home/user1/job.bat   

There are two previous rows to save two batches unknowingly running .

When it runs, the batch pulls the file from the remote-server, but after the line fails to execute it and the batch file dies without going any further than the first row She goes.

The reason I'm searching for something like this is two times. 1) When I can use VNC from my laptop, but occasionally, it becomes unresponsive and I have no other way to take control, but to kill the VNC process and restart from the command line do; M2) When I am limited bandwidth, I will run an NIRCMD command to take a screenshot and send it to me via SCP so that I can follow myself, what is happening at home.

Can someone put light, why am I in this shape, that is, why my batch file gets stuck after the first line? More importantly, how can I fix this?

Dynamically try to use Schtask in your batch file to create a new task and Then run this task to apply different load scripts at the end of your work.

schtasks / create /? And the student / run /? Examples should help (FreeCellExample will be the closest you want, just remove the time constraints option.)

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -