I have created a console app in which i want to trigger multiple links at a specific time.after searching I have done something like this:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Mail;
using System.Text;
using System.Threading.Tasks;
namespace cronjob_Test_App
{
class Program
{
static void Main(string[] args)
{
StartProcess();
}
public static void StartProcess()
{
// Process.Start("https://notepad-plus-plus.org/repository/7.x/7.5.7/npp.7.5.7.Installer.exe");
var psi = new ProcessStartInfo("chrome.exe");
string a, b;
a = "https://notepad-plus-plus.org/repository/7.x/7.5.7/npp.7.5.7.Installer.exe";
b = "https://notepad-plus-plus.org/repository/7.x/7.5.7/npp.7.5.7.Installer.exe";
psi.Arguments = a;
Process.Start(psi);
psi.Arguments = b;
Process.Start(psi);
}
}
}
it starts all the links simultaneously.I want the first link to complete and then start the second one.how can I do it or if there is some other good way please suggest. I am using windows scheduler along with this console app to start the console app at a specific time.