05-29-2012
Batch
job system date problem
Problem: I created the exchange rate update automation (previous blog) for client. But when
I check this exchange rate I changed the system date to verify whether the
add-on working on month end or not. After i changed the system to original date
since the batch job is not working unless the system date changed to the future
date.
Solved: I
tried various forums; I didn’t find any solution related to this. At last I
found the solution in community dynamics blog .
In this article the author explained the whole batch job process in depth. Here
I found out the vital point for batch processing. Please read the article
before get into details that I am going to explain here.
BatchGlobal -This table responsible for Batch processing
and Cleanup the dead tasks. What i am saying here is, it is responsible for
changing the job from waiting to executing status vice versa and Executed tasks
changed to end status.
This
table contains the date and time of job when to execute and when to end. You
cannot open the table directly, AOS won’t allow it. So you can open it using a
job. See the below screen
When
you change the system date, batchGlobal dates changed to future date (last
executed job date and time). So the current date jobs cannot be executed the
Batch engine wait for the future date to come.
Changing the date to current date
in batchGlobal table will solve this problem. But you can’t change it in AOS
you must go to sqlserver to change the date to current date (time should be 5
hours behind the current time you will understand this if you read the blog),
and then wait sometime it won’t affect quickly it take some time.