A witness has told how a rubbish truck rolled down a hill towards a Perth primary school with a worker reaching across the front seat desperately trying to pull the brake.

"It gathered momentum quickly, it took off and away it went," Trevor Bushell, who was watching out of his window, told 6PR news.

"I thought, nothing is going to stop this."

Mr Bushell said the green waste truck was loading as normal when it began to roll towards Clifton Hills Primary School.

A worker in an orange vest ran five to 10 metres and jumped into the passenger side of the moving truck to try and stop it as it headed for the school. A crew of workers were running after the truck.