Click here to Skip to main content
15,890,717 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Windows Service Pin
Richard Deeming24-Jan-17 2:13
mveRichard Deeming24-Jan-17 2:13 
GeneralRe: Windows Service Pin
indian14324-Jan-17 15:51
indian14324-Jan-17 15:51 
GeneralRe: Windows Service Pin
indian14324-Jan-17 16:02
indian14324-Jan-17 16:02 
GeneralRe: Windows Service Pin
Richard Deeming25-Jan-17 3:01
mveRichard Deeming25-Jan-17 3:01 
AnswerRe: Windows Service Pin
Eddy Vluggen24-Jan-17 2:15
professionalEddy Vluggen24-Jan-17 2:15 
GeneralRe: Windows Service Pin
indian14324-Jan-17 15:53
indian14324-Jan-17 15:53 
AnswerRe: Windows Service Pin
Ashwin. Shetty30-Jan-17 17:41
Ashwin. Shetty30-Jan-17 17:41 
QuestionAn architectural question I have about my application using Threading Pin
indian14315-Jan-17 7:50
indian14315-Jan-17 7:50 
Hi,

I have a Console application which has to be repeatedly executed with some intervals. For that what I have done is, in main I have called the method that performs the action after that I put the Main into sleeping for a minute or so and then reexecuted it.

Here is my Code:
static void Main(string[] args)
{
    ApplicationOrNamespaceName = typeof(Watcher).Namespace.ToString();
    ClassName = "Watcher";

    while (true)
    {
    RecordFile();

    System.Threading.Thread.Sleep(1000 * 60 * WatcherDB.GetCycleTimeForLoopingTheApplicationForEnvironment()); // Sleep for 1 minutes

    //System.Threading.Thread.Sleep(1000 * 60 * 5); // Sleep for 5 minutes for Testing
    }

}

My question is, is it suggestible? OK? can this code bad for performance? or if you have any better approaches for performance please help me, any advice, link or code snippet is appreciated. Here I didn't use Windows Service or Scheduled Task because if the application is running and if Windows Service tries to access it again, then its a problem, maybe not true, but that's what I have thought. But any suggestions also fine my friends.

Thanks in advance my friends.
Thanks,

Abdul Aleem

"There is already enough hatred in the world lets spread love, compassion and affection."

AnswerRe: An architectural question I have about my application using Threading Pin
Dave Kreskowiak15-Jan-17 11:29
mveDave Kreskowiak15-Jan-17 11:29 
GeneralRe: An architectural question I have about my application using Threading Pin
indian14316-Jan-17 20:38
indian14316-Jan-17 20:38 
AnswerRe: An architectural question I have about my application using Threading Pin
NotPolitcallyCorrect15-Jan-17 12:29
NotPolitcallyCorrect15-Jan-17 12:29 
AnswerRe: An architectural question I have about my application using Threading Pin
Pete O'Hanlon15-Jan-17 21:40
mvePete O'Hanlon15-Jan-17 21:40 
GeneralRe: An architectural question I have about my application using Threading Pin
indian14316-Jan-17 20:36
indian14316-Jan-17 20:36 
GeneralRe: An architectural question I have about my application using Threading Pin
Pete O'Hanlon16-Jan-17 23:33
mvePete O'Hanlon16-Jan-17 23:33 
GeneralRe: An architectural question I have about my application using Threading Pin
indian14317-Jan-17 7:21
indian14317-Jan-17 7:21 
GeneralRe: An architectural question I have about my application using Threading Pin
Pete O'Hanlon17-Jan-17 7:27
mvePete O'Hanlon17-Jan-17 7:27 
GeneralRe: An architectural question I have about my application using Threading Pin
indian14317-Jan-17 7:40
indian14317-Jan-17 7:40 
QuestionCustom datagrid collumns winform and tabcontrol Pin
lakilane11-Jan-17 21:54
lakilane11-Jan-17 21:54 
QuestionRe: Custom datagrid collumns winform and tabcontrol Pin
ZurdoDev16-Jan-17 5:50
professionalZurdoDev16-Jan-17 5:50 
QuestionRegEx to replace all characters of a name after 3rd character Pin
indian1434-Jan-17 13:45
indian1434-Jan-17 13:45 
AnswerRe: RegEx to replace all characters of a name after 3rd character Pin
Dave Kreskowiak4-Jan-17 15:22
mveDave Kreskowiak4-Jan-17 15:22 
GeneralRe: RegEx to replace all characters of a name after 3rd character Pin
indian1434-Jan-17 19:05
indian1434-Jan-17 19:05 
GeneralRe: RegEx to replace all characters of a name after 3rd character Pin
Dave Kreskowiak4-Jan-17 19:32
mveDave Kreskowiak4-Jan-17 19:32 
GeneralRe: RegEx to replace all characters of a name after 3rd character Pin
Pete O'Hanlon4-Jan-17 20:44
mvePete O'Hanlon4-Jan-17 20:44 
GeneralRe: RegEx to replace all characters of a name after 3rd character Pin
Medicomart16-Jan-17 19:03
professionalMedicomart16-Jan-17 19:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.