Is there a way to internally stop a template that is defined to have unlimited tasks?

vrg5

Client
Регистрация
16.04.2012
Сообщения
23
Благодарностей
0
Баллы
0
Hi, here is my situation:

I'm running a scrape (the template is written in CodeCreator).

I cannot use internal loops because then the memory inflates, so I'm running the template with 'unlimited' tasks in ZennoPoster.

However, once the scrape is over I need the template to stop. I cannot know in advance when the scrape will end, it depends on the website I'm scraping.

If I'm scraping page by page, once I get a 404 error on the last page, it means the scrape is over, and then I need ZennoPoster to halt execution, even though the template is running with 'unlimited' tasks.

How can I achieve this?

Thanks
vrg5
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
830
Баллы
113
Use global variable to check if you need to execute template. Set its variable value true, and once you get 404 set it false.
 

vrg5

Client
Регистрация
16.04.2012
Сообщения
23
Благодарностей
0
Баллы
0
Will give this a try, thanks for the help!
 

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