Scheduler starts an already started task

Here you can submit your bug reports.
Post Reply
Broemmelhaus
Posts: 13
Joined: Tue Nov 29, 2011 12:00 pm
Location: Bonn, Germany

Scheduler starts an already started task

Post by Broemmelhaus »

We have observed that WingFTP tasks within the scheduler appear to be re-invoked after 20 seconds if they have not completed by that time.

A very simple task that I scheduled illustrates this problem clearly:

Code: Select all

	Mail_to = 'Your@Mailadress'
	c_SendMail(Mail_to, 'TEST-Wait 30 seconds-Start', 'TEST',"",'YourSMTP')

		check = c_GetTimeMS() + 30000
		while c_GetTimeMS() < check do 
			print ('')
		end

	c_SendMail(Mail_to, 'TEST-Wait 30 seconds-Ende', 'TEST',"",'YourSMTP')
The task is designed to send a total of two emails—one at the beginning and one at the end of the routine.
However, a total of four emails are actually being sent. The logs also record four emails and indicate that the task was executed successfully twice.

We are currently using Wing FTP Server version 8.1.1. This error was first noticed during a complex task that could not be completed within 20 seconds. Are you able to reproduce this bug, and is it possible that you could fix it in an upcoming release?
FTP
Site Admin
Posts: 2171
Joined: Tue Sep 29, 2009 6:09 am

Re: Scheduler starts an already started task

Post by FTP »

Yes, because WingFTP will change the task status after the Lua script is executed, but your script takes more than 30 seconds, so it will be invoked twice. Anyway, we will improve it by changing the task status at the beginning.
Post Reply