Is it possible to change upload speed in an active thread?
hi,
i have the following challenge:
Once a week i'm uploading a big file ~500 GB to another location (private use: transfering a backup of my VM to a friend's NAS System). The transfer takes a few days.
Right now I'm doing this manually via WinSCP GUI. Not to stress the availible bandwidth to much, in the morging I'm throttling down the speed - at nighttime I'm setting the speed to unlimited.
That works fine with the WinSCP GUI.
My plan is to automate these manual tasks.
Idea: Writing a routine with 2 Threads:
Thread 1: running the upload
Thread 2: checking the time and "telling" thread 1 the appropriate upload speed
Now my questions:
Is it possible to change upload speed in an ACTIVE thread (here thread 1)?
-> I hope it is (My hope is based on the WinSCP GUI because the GUI must handle this in similar manner)
If no: My idea "is dead"
If yes:
What's the best environment to develop it?
I think the only choices are VB oder C# (because they support threading)?
Powershell would be the "easiest" environment, but seems not to be the right choise, because it does not support "real threading" (my knowledge...!). Start-Job is not real threading and i don't think that there is a way to "modify" (change upload speed) in a runing job..?
If anybody already has developed this, or a similar solution, I would be pleased to have some sample code (my thread programming knowledge is only theoretically...)
Thanks in advance
i have the following challenge:
Once a week i'm uploading a big file ~500 GB to another location (private use: transfering a backup of my VM to a friend's NAS System). The transfer takes a few days.
Right now I'm doing this manually via WinSCP GUI. Not to stress the availible bandwidth to much, in the morging I'm throttling down the speed - at nighttime I'm setting the speed to unlimited.
That works fine with the WinSCP GUI.
My plan is to automate these manual tasks.
Idea: Writing a routine with 2 Threads:
Thread 1: running the upload
Thread 2: checking the time and "telling" thread 1 the appropriate upload speed
Now my questions:
Is it possible to change upload speed in an ACTIVE thread (here thread 1)?
-> I hope it is (My hope is based on the WinSCP GUI because the GUI must handle this in similar manner)
If no: My idea "is dead"
If yes:
What's the best environment to develop it?
I think the only choices are VB oder C# (because they support threading)?
Powershell would be the "easiest" environment, but seems not to be the right choise, because it does not support "real threading" (my knowledge...!). Start-Job is not real threading and i don't think that there is a way to "modify" (change upload speed) in a runing job..?
If anybody already has developed this, or a similar solution, I would be pleased to have some sample code (my thread programming knowledge is only theoretically...)
Thanks in advance