2

I have created a job in Talend which I want to schedule everyday through Windows Task Schedular on my dedicated machine. I have exported the job and gave the path of executable batch file to Task Scheduler. Now the issue is that when the job executes through the Task Scheduler it does not insert any data from source MySQL database tables (from a remote client machine) into destination MySQL database tables (at my local dedicated machine). Whereas, whenever I execute the same batch file just by clicking on it then it works perfectly fine.

Please help!

Jafar Imam
  • 21
  • 2
  • Have you added a tLogCatcher yet? If there are any errors in the job, you should catch them and write them to a file at a specific place. – tobi6 Jun 02 '16 at 06:57
  • I have used tLogCatcher and there is no error in the job totally, as it runs just fine when I execute it through Talend or through the batch file. – Jafar Imam Jun 02 '16 at 08:24
  • Is the context for both jobs set the same? Does the Task Scheduler give an error result somewhere? – tobi6 Jun 02 '16 at 09:10
  • There is only one job. Task Scheduler completes the process successfully without any error. Even the tsendmail components work correctly and I receive the emails as well, but the data does not transfer from source to destination tables. – Jafar Imam Jun 02 '16 at 13:43
  • Sure, I meant if the context in the scheduler might be different than the one when executing the batch file. I would add a tLogRow / log file temporarily directly before the MySQL output and check the data (if not already there). Then I would remove "Extended Insert" on the output and add a "Rejects" row, also putting them into a tLogRow / log file. – tobi6 Jun 02 '16 at 15:21
  • I do not understand what do you mean by 'difference of contexts' in scheduler and batch file. Can you please explain? – Jafar Imam Jun 07 '16 at 07:30
  • Have you checked my recommendations? It is possible to provide different contexts for e.g. different environments. But if you ask, I suppose you didn't set it differently. – tobi6 Jun 07 '16 at 07:53
  • Yes I checked your recommendations. There is not even a single rejection/insertion of rows when job executes from the Task Scheduler. Just to inform you that the job is scheduled by a different user on Task Schedular and not from my user, since my user does not have admin rights to schedule a task on the machine. – Jafar Imam Jun 08 '16 at 10:34
  • When you execute the batch script via the scheduler, are you doing so as the same user as when you execute the batch script manually? – tale852150 Jun 08 '16 at 15:54
  • Nope. The scheduler runs the batch file with an admin user, which is not mine. – Jafar Imam Jun 10 '16 at 11:38

0 Answers0