Page 1 of 1

Scheduler starts an already started task

Posted: Wed May 13, 2026 5:19 am
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?

Re: Scheduler starts an already started task

Posted: Wed May 13, 2026 2:38 pm
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.