There is a way to terminate a project if it runing for a longer time?

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
As the tread say, there is a way to write in any point of project, as a snipet, c# common code, etc a way to terminate project if it is running for a long time, as example, if project is running for 30 min, terminate it.
 

zortexx

Client
Регистрация
19.09.2011
Сообщения
2 520
Благодарностей
1 223
Баллы
113

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 271
Благодарностей
5 856
Баллы
113

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
Thanks!

I'll test for tasks sheduled in task manager.... that tasks the "interrupt" command not work (in older versions).
 
Последнее редактирование:

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 271
Благодарностей
5 856
Баллы
113

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
Why not work? you should set execution timeout and if thread hanges longer than this time, it will closed
Sorry, I add older versions because If my task crash for any reasons after enter in eternal waiting for website answer, If I try enter in task manager, right click on stoped task and click in "interrupt", the command never works, the same problem not occours in tasks sheduled by sheduled taks outside task manager.
 

pla123

Client
Регистрация
10.12.2011
Сообщения
22
Благодарностей
2
Баллы
3
Is There any C# code to stop the project at a certain time? For example stop project after 10 PM
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
Yes.
Код:
if (DateTime.Now.Hour > 22){
    ZennoPoster.StopTask("Mytask");
}
 

EtaLasquera

Client
Регистрация
02.01.2017
Сообщения
524
Благодарностей
112
Баллы
43
Here is the best solution...
 

Вложения

  • 23 КБ Просмотры: 152

pla123

Client
Регистрация
10.12.2011
Сообщения
22
Благодарностей
2
Баллы
3
Than k you bro
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)