Sequencing Batch File Runs When AmiBroker Has Been Closed for A While

Hi,

How does one control the sequencing of batch files when AmiBroker has been closed for a while and then is reopened? If I leave AB open the batch scheduler works great and does everything I need it to. However, if AB has been closed for a few days and then I open it the sequencing is not the same. I am using the “At specific date/time” option.

I have noticed that when AB is launched after a few days of being closed it seems to follow the scheduler sequential order but not the associated time. Can I just delete and re-add the batch files in the order I want to run them in for this instance?

Again…the issue is not the scheduler itself. It works just like I have set it when AB is open and running. The problem is when AB is reopened and the auto scheduler is catching up for missed scheduled batches.

Thanks!

If there are many batches that passed their due time they will be run on startup in the order in which they appear in scheduler window (i.e. in the order they were added).

1 Like

Just having a variation to the issue. Am attaching the screeenshot:2018

While the last batch is supposed to run the first (as per time sequence), I have observed the first batch to run first. Has it something to do with the sequnce in the scheduler window?

How did you come to such assumption? Did you even bother to read what I wrote in my last reply? What I wrote is exact reverse:

If there are many batches that passed their due time they will be run on startup in the order in which they appear in scheduler window (i.e. in the order they were added).

@Tomasz It's not that way around. The idea was to have the files to run as per the scheduled time. Therefore the query. As of now I have rearranged the scheduler as per time.

Maybe SORT functionality may help.

As I wrote twice already:

  1. if AmIBroker IS RUNNING, then scheduled tasks are executed according to their scheduled time.

  2. If AmiBroker is NOT running, then all tasks PAST their due time will be run next time you start AmiBroker in the order in which they appear in scheduler window (i.e. in the order they were added).

Hi

I apologize reopening this topic however I am at a loss in finding an explanation for my following situation with batch jobs and the scheduler. It seems that the explanation provided by Tomasz is the cause of this however I don't know why

In summary, a bit of background with my situation.

I have a dedicated PC with AmiBroker (AB) which fires up at 5pm and AB starting via the windows task scheduler at 5.02pm.
I have configured a number of batch files (jobs) via the scheduler in AB of which the first one is the Norgate updater running at 5:05pm (which takes about 10 minutes to complete)
Then I have the a single batch file for each system which performs the LoadProject, Explore, Export and a ExecuteAnd Wait ( for emailing the report) , from each system’s apx file.
In this scenario, there are 3 systems and each of these batch files are scheduled to run at 5:30pm, 5:31pm and 5:32pm respectively.
Then the PC is shutdown at 6pm.

I understand that each AB system batch file does take more than a minute to execute however based on my understand the scheduler will not move onto the next batch file (job) until the current one is completed.

All the above works well, however it seems that the system batch files are execute twice as I am receiving 2 lots of reports for each system.
I receive one lot of reports between the time of 5:15pm and 5:20pm and the 2nd lot of reports at the ‘correct’ time of around 5:40pm.

Based on the times of the report it seems that the scheduler is running through jobs twice. Is there a way to address this ?

Thanks