WinSCP: Scheduling multiple tasks at same time

In the task scheduler, I have created three tasks, which make use of WinSCP. The purpose is to collect a text file from one server and put it to another server.

These three jobs were scheduled to run at 5:00 a.m., so that they would run at the same time.

Questions:

  • Will three jobs trigger at 5:00 a.m?
  • If several tasks are scheduled at the same time, will they start?
  • Can the three jobs extract the same file at the same time?

Solution 1:

There's no problem running multiple scheduler tasks at the same time.

There's generally no problem reading the same file using multiple parallel processes at the same time. WinSCP definitely does not use exclusive locks when reading local files. Most SFTP/FTP servers won't lock remote files either. But obviously this would be server-specific.

Obviously you need to make sure that your parallel tasks do not write to the same file. WinSCP locks local files for writing, which would break your task. Server behavior for locking writes to remote files is generally undefined (can cause error, can lose data, whatever).

Anyway, if you're talking a few files, hence a short task, wouldn't it be better to run the three tasks in a sequence (e.g. as a single scheduler task)?