If you want the code….

while (1=1)

do

#eject cdrom

eject

#pull tray back

eject -f

done