I have a scheduled task setup to import items from a datasource. The task seems to kick off ok as I receive an email from the the cmsimport robot, but the import process always seems to have an error. The error message is below:
1 records in datasource
0 records added
0 records updated
0 records skipped
1 errors during import
Errors:System.NullReferenceException: Object reference
not set to an instance of an object. at
CMSImportLibrary.FieldAdapters.FieldFactory.[1].[1](IFieldAdapter [1]) at
System.Collections.Generic.List`1.FindAll(Predicate`1 match) at
CMSImportLibrary.FieldAdapters.FieldFactory.Parse(Property prop, Object value,
FieldAdapterOptions fieldAdapterService) at
CMSImportLibrary.Import.ContentImporter.Import(ImportState state, User
importAsUser)
Any idea why this keeps happening? I get this for every single import that I try to run. If I do the import manually (going through the wizard steps) it seems to import and publish with no problem.
What happens if you just open the saved import definition? The error is related to FieldAdapters, did you use one? If opening the saved definition gives you the same error you might want to delete these definitions and save the manual process again and schedule that one. Still a weird error though.
For some reason, this seems to be working again now and publishing items now on a scedule. But now I have another weird issue, it seems to be creating duplicates of those items. It only does this when I have the sceduled task activated, it creates around 7-8 duplicate items for every item it imports. Importing it manally (right click & execute) works as normal and only imports and publishes once.
I have checked in the umbracoSetting.config and made sure that ensureUniqueNaming is set to true, which it is.
So next I checked the Umbraco log table and can see that it seems to call the scheduled task multiple times in a minute even though I have the polling set to 60 seconds (see line below)
I think for some reason the umbraco scheduler queued up the scheduled url's and executes them at the same time. Not sure if that causes duplicate items because normally a relation record is created and then an update will occur.
I've seen an email this week where the customer used an external ping site (pingdom) or Google to ping the scheduledtaskhandler every hour then the import occured. maybe that could be an option for you as well?
It just seems that whenever I the schedule gets called, it does it 7 times with the set polling period when it should only be once. And on the front end it creates and publishes 7 versions of that same item as well. It just seems a little strange that even though the polling is set to 60 seconds it should only fire once, not 7.
This is an example of what is created in the content tree:
Is there something I can do with the Umbraco scheduler to sort this? I'm not familiar with this.
The external ping sounds interesting. What is required to set this up and and URL would it ping?
Error in scheduled task
Hi,
I have a scheduled task setup to import items from a datasource. The task seems to kick off ok as I receive an email from the the cmsimport robot, but the import process always seems to have an error. The error message is below:
Any idea why this keeps happening? I get this for every single import that I try to run. If I do the import manually (going through the wizard steps) it seems to import and publish with no problem.
Thanks
Forgot to mention, i have Umbraco v4.0.4.2 and CMSImport v1.2
Hi,
What happens if you just open the saved import definition? The error is related to FieldAdapters, did you use one? If opening the saved definition gives you the same error you might want to delete these definitions and save the manual process again and schedule that one. Still a weird error though.
Cheers,
Richard
For some reason, this seems to be working again now and publishing items now on a scedule. But now I have another weird issue, it seems to be creating duplicates of those items. It only does this when I have the sceduled task activated, it creates around 7-8 duplicate items for every item it imports. Importing it manally (right click & execute) works as normal and only imports and publishes once.
I have checked in the umbracoSetting.config and made sure that ensureUniqueNaming is set to true, which it is.
So next I checked the Umbraco log table and can see that it seems to call the scheduled task multiple times in a minute even though I have the polling set to 60 seconds (see line below)
In the Umbraco log table, it says this (as an example):
2722267 | 0 | -1 | 2011-11-30 10:03:46.690 | ScheduledTaskCMSImportScheduler has been called with response: True
2722266 | 0 | -1 | 2011-11-30 10:03:45.723 | ScheduledTaskCMSImportScheduler has been called with response: True
2722265 | 0 | -1 | 2011-11-30 10:03:27.527 | ScheduledTaskCMSImportScheduler has been called with response: True
2722264 | 0 | -1 | 2011-11-30 10:03:25.617 | ScheduledTaskCMSImportScheduler has been called with response: True
2722263 | 0 | -1 | 2011-11-30 10:03:20.450 | ScheduledTaskCMSImportScheduler has been called with response: True
2722262 | 0 | -1 | 2011-11-30 10:03:20.013 | ScheduledTaskCMSImportScheduler has been called with response: True
2722261 | 0 | -1 | 2011-11-30 10:03:03.477 | ScheduledTaskCMSImportScheduler has been called with response: True
Why is it being called multiple times per minute, even though the task is set to once every 60 seconds? How can I get rid of the multiple calls?
Hi Bijesh,
I think for some reason the umbraco scheduler queued up the scheduled url's and executes them at the same time. Not sure if that causes duplicate items because normally a relation record is created and then an update will occur.
I've seen an email this week where the customer used an external ping site (pingdom) or Google to ping the scheduledtaskhandler every hour then the import occured. maybe that could be an option for you as well?
Best,
Richard
Thanks for replying Richard.
It just seems that whenever I the schedule gets called, it does it 7 times with the set polling period when it should only be once. And on the front end it creates and publishes 7 versions of that same item as well. It just seems a little strange that even though the polling is set to 60 seconds it should only fire once, not 7.
This is an example of what is created in the content tree:
Is there something I can do with the Umbraco scheduler to sort this? I'm not familiar with this.
The external ping sounds interesting. What is required to set this up and and URL would it ping?
Thanks,
Bijesh
is working on a reply...