My Use Case:
I have a feed importer all set up (using a standalone form). I am pulling from an oData feed (so I have a custom module where I set up a custom parser). I need to take advantage of oData's ability to add query strings to the url to change the content that is returned (for example only grabbing the top x results skipping x items where a particular field has a particular value). This all works fine when I use the standalone form. But I need it to happen programmatically.

My Question:
There is a clear example on how to trigger an import programmatically ( http://drupal.org/node/622700 ) but it seems this example is for feed nodes and you need a node id... how would you do this if using a standalone form and pass in the url you want?

Side Note:
It seems like there should be a url field on the Basic Settings tab next to the "Minimum refresh period" in case you have chosen standalone form instead of attaching it to a content type... perhaps that is what edale2112 is asking for here : http://drupal.org/node/1255296

CommentFileSizeAuthor
#6 feeds.jpg49.29 KBjelo

Comments

michaelfavia’s picture

This is also something im looking for in the 7.x branch.

I would like to see the saved value from the "import/FEED_NAME" form used on recurring cron runs.

As a stopgap, I have temporarily created a content type and a single node to attach the feed to but that seems like alot of unnecessary overhead for 1 feel url. Thoughts?

twistor’s picture

You should be able to use 0 as the feed_nid. That will grab the standalone form.

sachbearbeiter’s picture

@2 can you explain this further?
i have the same problem - configured now everything 2 days long to see that the url is not used in cron jobs ...

thanks sb

jelo’s picture

Component: Feeds Import » Code

I have the same issue. I have 2 single feed URL sources and I do not want to create two content types to attach the importer to. Instead, the standalone form would work with the exception that I need to be able to run the import as part of cron.

twistor’s picture

@jelo, the standalone importer should still run on cron.

jelo’s picture

StatusFileSize
new49.29 KB

Sorry, I should have tested it more. It indeed seems to run. I use Elysia cron and had set feeds_cron to only run every hour which probably prohibited my faster updates that were configured in the importer.

I don't believe feeds 6.x has a feeds log yet. Is there a way to check if and when the importer ran? In the watchdog I am only seeing a couple of items because the feed seems to timeout every once in a while.

I checked the job_schedule table and was surprised to see two entries (see attachment). I had switched the importer from being attached to a content type to standalone form. It apparently kept the entry for the initial importer (node ID 8865) even though I deleted the node subsequently. When I make changes to the importer, e.g. minimum refresh period, the entry with the ID 8865 gets updated, e.g. the period column changes. Should it not have deleted that entry and make those updates to the entry with ID 0?

twistor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)
waqarit’s picture

Where is the ulr "import/feed_importer_name" under admin menu?