How can I check the running progress or intermediate output of tasks submitted to the cluster?

My script contains println or other codes to output some progress information to monitor the running progress of the script. After submitting it through SLURM, the script starts running. However, during the execution of the code, the .out file does not contain any content, and I can only see the intermediate output in the .out file after the code has finished running. How can I view progress information during the execution?

Running Julia with slurm, output not being printed until after completion - New to Julia - Julia Programming Language (julialang.org)