A gardening machine includes a rod portion, a control portion, a switch assembly and a locking member. The switch assembly includes a control member. The control member is disposed on the control portion and is movable to locate in a first position or a second position. The locking member is disposed on the control portion and is movable to locate in a locking position or a releasing position. When the locking member is located in the locking position, the locking member abuts against the control member to be positioned to the second position.本發明關於一種園藝機,包括一桿部、一控制部、一開關組件及一鎖定件。該桿部設有一工具機座頭。該開關組件包括一控制件,該控制件設於該控制部並可移動於一第一位置及一第二位置。該鎖定件設於該控制部並可移動於一鎖定位置及一解除位置,當該鎖定件位於鎖定位置時將該控制件卡抵定位於該第二位置。