Hallo,
i have a running agent (once a Night), which performs two custom defined task. It run's fine for each single task, but it breaks if i like the two task running behind eachother.
basically i have the following in the Execute() of parseAgent (it's enabeld only on one Frontendserver (german). It's the Frontend, because we need Tomcat for the DocuLink, which is only available there):
...
if ($Kernel.SystemPreferences.GetPref("ERPpro", "ConfigRunWithAgent", "") == "1")
$SAPTableImport.ERPproUtils.main()
else
$SAPTableImport.ERPproUtlis.scrLogWrite("Agent started, but run disabled -->> check Config of ERPpro")
end
if ($Kernel.SystemPreferences.GetPref("ContrAct", "ConfigRunWithAgent", "") == "1")
$SAPTableImport.ContrActUtils.main()
else
$SAPTableImport.ContrActUtils.scrLogWrite("Agent started, but run disabled -->> check Config of ContrAct")
end
...
It runs fine, if only one of both "if" is ok, but if i enable both, than the agent restarts all 5 Minutes.
Probably the issue is, that in both cases i need a input File and if this file is not available, i output (and log) a ErrorMessage. But in this case, i want the agent to go on doing the second Task, because it may be ok, that not every time the Agent runs, it also has to do some thing.
So i expect, that i should not use the Error for this kind of information and i think, that this error may stop the agent, but i can not find any documentation on that issue. Is there a return Value expected from the Functions called by the agent?
Thomas