I'm trying to make an automatic cactus farm and am doing some testing, will this work?

I'm on version 21.9 Java
Will this cactus farm work?