It happened on the A1 near Dunbar.
Boys Warned After Near Miss At Railway
Two boys aged nine and 11 have been given a formal warning after they narrowly missed being struck by a high-speed train on a railway line in Edinburgh.
Officers have identified eight boys aged between six and 12 who were involved in a series of trespassing incidents at Wester Hailes station.
British Transport Police said information on some of the youngsters was passed to the reporter to the Children's Panel while others were given formal warnings in front of their parents.
The service issued an alert in May after the narrow miss and other incidents in which young children were seen running across the railway line and jumping off platforms at the station.
Constable Niall Bonnar of BTP said: "Following extensive enquiries we were able to track down those who had been involved and attended their home addresses.
"Their parents expressed real shock when informed of the circumstances and have been extremely supportive in reinforcing the seriousness of the actions to the boys.
"The two boys who narrowly missed being struck by a high-speed train as it passed through the station were identified and following consultation with other agencies were each issued with an early and effective intervention formal warning.''
BTP said an initiative aimed at reducing the number of trespassing incidents in the area had been "extremely effective''.
Mr Bonnar added: ``Before the schools broke up BTP officers visited the primary schools in the vicinity of Wester Hailes station and delivered rail safety presentations to around 1,200 pupils. These were well-received by pupils, teachers and parents alike.
"We also increased high-visibility patrols, particularly during the school summer holidays, and there were no more incidents of children trespassing during that period.''
Patrols and monitoring will continue in the area to prevent incidents recurring, he said.
The 26 year old was first targeted in Briarscroft Road.
Euan Johnston was shot in his car last month.
The family of three crash victims took their case for the 59-year-old to be put on trial to the Appeal Court in Edinburgh earlier this year.
Most Viewed Pictures On Heart
Recently Played Tracks
To listen live, choose your preferred location:
Deposit £10 to get a £40 Welcome Bonus - That's £50 to play bingo, slots and more!*
Over 50 tracks to make you feel-good. New album out now...
Find your local four day weather report here.
Make Heart the soundtrack to your day and you could be a winner with great prizes up for grabs throughout the day.
Find out more about some of the companies advertising on Heart Scotland- East.