Scheduling FTP services not to conflict


I have 2 scheduled ftp services on IS4.6

One of the services logs into an ftp site, and retrieves order flat-files from one directory location, and logs off. This runs every 15 mins.

The other ftp service logs into the SAME ftp site, and retrieves Inventory flat-files from a different directory and logs off. This runs every hour.

My problem is that when the 2 services run at the same time, one service will log off the ftp sessions, while the other service is trying to retrieve files.

I only have ONE ftp login to this account, and I want to distance the two scheduled calls. Currently, I manually started one service 7.5 mins after the other. But if we restart the server, they start to co-incide at the same times again. Is there a way to have a scheduled service remember what time to start again (on server restart)?


Currently what type of Schedule task you have created in your IS/AdminConsole.

One-Time and Simple Interval Tasks
Complex Repeating Tasks

If you use the Complex Repeating Task there you can set Start/End times depends on your requirement.



Hi Piara Singh,
You can achieve what you are asking for by following the approach listed below. But somehow I feel your solution is not right. There should we a better way/solution to your problem.

Anyways, you can achieve what you are asking for by following this pseudo code.

create a flow svc (have this flow svc as startup svc of the package it is in - this will ensure that this svc runs on server start up)
the flow svc will look something like this;

cancel any instance of FTP1, FTP2 if they exist (using cancelTask)
(above 2 steps are for safegaurd purposes)
pub.scheduler.add<>Task - this adds FTP1 Svc
wait for 7.5 mins using java svc
pub.scheduler.add<>Task - this adds FTP2 Svc
(remember to have input persitJob set to FALSE)

this will do the job for you! let me know if you have any questions on the pseudo code.


Thanks. I will try the first approach first.

I am currently using “Simple Repeating Tasks” to schedule the service.

If I were to specify a start-time (i.e. 00:07), for a service that runs every hour; and I re-start the server at 17:00.

Will the scheduler calculate the interval starting from 00:07 (i.e. run at 17:07), or will it wait till 00:07 to start the scheduled service?

Good question,

I believe it will start from 17:07 once the IS came up.

Hi Piara Singh,
If you were to follow RMG’s approach, this is what you have to do.

Set up the Complex Repeating task to run as follows (dont choose any options in month,day, weekly day, hr options - only choose the following in minutes option)
FTP1 Svc: (this svc runs every 15 min) 00:15:30:45
FTP2 Svc: (this svc runs every 1 hr) 07 or 08 [there is no way to specify half minutes]

Irrespective of the time you restart your server, the svc will run every hr on the minutes specified.


PS: Please note that I still think this is not the best approach to schedule both the services 07 minutes apart. what if, the service takes more than 07 minutes to retrieve the files, and the other svc kicks in.
This implies that this solution is not full proof.

I guess you should “hunt” for a better solution.

Hi Saurabh,

Thanks for your suggestion. It sounds that it may solve my problem.

I understand your concern that a better solution is required, but I’m hunting for a quick-fix right now. Actually, there was originally only one ftp server where we ftp’d from an internal server. A second message type was added for a different transaction, and it was placed in a different folder on the same ftp server.

As, the ftp server is internal, and the volume of files are reasonable, I don’t expect it to take long to ftp the data. But I will implement a solution (eventually) to force a delay between ftp. Maybe having separate ftp logins will also be an easy solution.

Thanks anyway.