Will it work Timer? This form Timercalls your function in Task, so you need to periodically call control from your main loop to allow the timer task to run. You can get by calling yield, sleep, waitor doing the IO, here I show waiting on the timer.
tstart = time()
ncalls = 0
read_modbus() = (global ncalls+=1;@show (time()-tstart)/ncalls,ncalls)
t=Timer((timer)->read_modbus(),0,0.25)
while true
wait(t)
println("mainloop $ncalls")
end