Crontab + Automation public void Run(): Don't work

8 years 7 months ago #2190 by NightOne
I am also having trouble with cron. My system is EasyIOT on windows (V0.9b1)... when I set up cron it runs once only and then only runs again with I restart the server....
In the config directory in the programs.xml file the cron entry looks like this:

</SourceCode>
<Errors>[]</Errors>
<CodeOk>true</CodeOk>
<Enabled>true</Enabled>
<LastOccurrence>-</LastOccurrence>
<NextOccurrence>9999-12-31 23:59</NextOccurrence>
</ProgramContainer>
<ProgramContainer>
<ProgramId>14</ProgramId>
<Name>test1</Name>
<CronExpression>* * * * *</CronExpression>
<SourceCode>/*

as you see it says next occurance is 9999-12-31 I am sure that is not right.
I am running this test code so I know its not a code error.

public void Setup()

{
Console.WriteLine("My test program Setup executed");
}

public void Run()
{
Console.WriteLine("My test program Run executed");
}

Please Log in or Create an account to join the conversation.

8 years 7 months ago #2194 by NightOne
I have been working hard at troubleshooting my crontab issues and have discovered what is causing the issue,,,, Please note that this might be on my system only so others might want to try and see if it is the same for them.

The Automation tasks that i have been adding have always been overwriting the sample code some of which were not set with crontab, to troubleshoot I did a fresh install and watched the console only to see that there where automation task running that where not in my automation list.... I checked the programs folder and saw that there were a lot more program dlls there then automation tasks, and the console was outputting compiled DLLs from the program folder not what I had in automation.

I i deleted everything in the program folder and recreated all my automation scripts as new scripts rather then overwriting old scripts... this generated all new programs in the program folder and now they run fine with there configured crontab entries.
I have not tried chaning the crontab expressions meaning I created the crontab expression when I added a new automation script not after the fact.

Please Log in or Create an account to join the conversation.

Time to create page: 0.247 seconds

Forum latest

  • No posts to display.