zpproj runs successfully in code creator and as a single task but not in scheduler

snikeru

Новичок
Регистрация
30.10.2011
Сообщения
3
Благодарностей
0
Баллы
0
Hi. I've created a simple PHP project in CodeCreator. All it does is go to a specific URL. It runs successfully in CodeCreator (Start Debug) and when I add it in ZennoPoster as a single task. But when I schedule it I get an error saying it couldn't be executed. The file location is correct and the file is accessible. Here are the error messages from the log

2011-10-30 2:15:07::843 Message It's task time simpletest
2011-10-30 2:15:08::343 Error ZennoPoster Template C:\Program Files\ZennoLab\ZennoPoster Lite\Progs\Projects\simpletest.zpproj couldn´t be executed
2011-10-30 2:15:08::421 Error ZennoPoster Template C:\Program Files\ZennoLab\ZennoPoster Lite\Progs\Projects\simpletest.zpproj couldn´t be executed
2011-10-30 2:15:08::484 Error ZennoPoster Template C:\Program Files\ZennoLab\ZennoPoster Lite\Progs\Projects\simpletest.zpproj couldn´t be executed
2011-10-30 2:18:30::500 Message ZennoPoster Template C:\Program Files\ZennoLab\ZennoPoster Lite\Progs\Projects\simpletest.zpproj is executed successfully!
 

snikeru

Новичок
Регистрация
30.10.2011
Сообщения
3
Благодарностей
0
Баллы
0
Anybody else experienced this problem? I can successfully run the PHP project manually but I'm getting error messages when I schedule it.
 

shade

Client
Регистрация
19.11.2010
Сообщения
580
Благодарностей
346
Баллы
63
Hi, snikeru.

Look at this message:

2011-10-30 2:15:08::343 Error ZennoPoster Template C:\Program Files\ZennoLab\ZennoPoster Lite\Progs\Projects\simpletest.zpproj couldn´t be executed
The project was compiled successfully and it was started.
This means that your script was completed with code "-1", your script returned "-1" (line: return -1; ).

But in last message:

2011-10-30 2:18:30::500 Message ZennoPoster Template C:\Program Files\ZennoLab\ZennoPoster Lite\Progs\Projects\simpletest.zpproj is executed successfully!
All fine.
So it means that your code has bugs.
First: Check the search of elements, maybe sometimes your script just does not find elements
Second: If a Web page contains Ajax then you need to add delay.
 

snikeru

Новичок
Регистрация
30.10.2011
Сообщения
3
Благодарностей
0
Баллы
0
Thanks shade. I got the error when ZennoPoster tried executing the project automatically using the scheduler as seen in the log:

2011-10-30 2:15:07::843 Message It's task time simpletest

But when I manually add the template it is executed perfectly.

All the project does is go to www.google.com and it doesn't search for any elements. Have you tried scheduling a PHP project successfully in ZennoPoster? Here's the code :

<?php
import namespace System;
import namespace Zennolab:::CommandCenter;

class Step1
{
public static function Execute($instance)
{
// Clearing cookies
$instance->ClearCookie();

// Going to www.google.com
$tb = $instance->MainTab;
if (($tb->IsVoid) || ($tb->IsNull)) return -1;
if ($tb->IsBusy) $tb->WaitDownloading();
$tb->Navigate("www.google.com");
if ($tb->IsBusy) $tb->WaitDownloading();
return 0;
}
}
?>
 

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