Creating a data input loop which only fires after a certain other job finishes
yobjob
![]()
- Joined: Jul 21, 2011
- Posts: 37
I am currently autmating setting up wordpress blgos on a host.
So far I've got to automating it all except having to change the url in a text file which winauto reads- so I'd been doing it by hand so far.
What I want to be able to do is have a list of several hundred urls plus their corresponding blog names and have winauto loop through them but only going to number 2, 3, etc once the last job is done.
So read text file for info on blog one ->input data and setup blog one. end.
Read text for blog two -> inut data etc.
I watched the 1st loop vid just then but didn't see how I would get it to trigger after each previous job completed.
yobjob
![]()
- Joined: Jul 21, 2011
- Posts: 37
Hmm been messing around for about an hour now and haven't been able to figure it out :(
What I thought would work: %Filecontents[%LoopIndex%]% threw up an error so I dunno what to try now.
Hmm I just watched the other loop video and I'm guessing the for each one is gonna solve it. I just had a lil play around, I'll come back to it tommorow. :)
yobjob
![]()
- Joined: Jul 21, 2011
- Posts: 37
Hmm, I'm getting rather confused with where each loop should go so could I get some pointers on this...
What is complicating matters is that I did each part in seperate jobs. Now I don't know whether I should put a loop around all the jobs or if I should put a loop within each job/both? I am thinking a loop within each is no good because it would be firing when I didn't want it to.
I'm having trouble with the for each loops. I have to have 2 loops- one for one data input one for another but for some reason the job only works for one.
It will count up through the data for one of the loops but when both are going it stays at the first entry for the other loop. The one with trouble works fine again when I disable the other loop...
I was trying to think of a workaround creating outside jobs just for that one but I run into the same issue of if they are seperate it means the loops withn the nested jobs would be firing out of sync with the other loop.
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2328
yobjob
![]()
- Joined: Jul 21, 2011
- Posts: 37
Good idea :D
Hmm, so for loops index I could just use one loop for all my files just using the index? That would really make life alot easier. I'll have a play with that now as that seemed the most logical way to do it before I found it didn't work through my erroneous coding.
Hmm, I just remembered that the loop indexed is related to the normal loop so I'd still be interested in your suggestions for the for each loop.
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2328
yobjob
![]()
- Joined: Jul 21, 2011
- Posts: 37
hi,
yes what you say didn't get to my issue.
The problem is that when I run the job the 1st loop isn't working.
I'll try and explain:
one file loop is for the urls:
url1
url 2
url3
etc.
Another file is for blog names:
blog 1
2
3
etc.
Now when I only have the for each loop for urls it works fine and counts them up accordingly but when I put the second loop for blog names it only counts up on the blog names and every url stays at line 0.
Samantha
![]()
- Joined: Apr 23, 2010
- Posts: 2328
yobjob
![]()
- Joined: Jul 21, 2011
- Posts: 37
That's what I ended up doing wiht the loop and it worked out ok.
cheers. :)