if output1 from rule1 is the input2 for rule2; is rule2 will while until rule1 output1 finished, or it will execute immediately after input1 is generated (which then could be a problem as they are not whole file)?
also, for analysis with many files, is it better to use snakemake for each file through whole process; or it is better to run all file at the same time for each step?
You should actually learn to do it properly as suggested here and in the docs: https://stackoverflow.com/questions/76166705/how-do-i-set-up-snakemake-on-slurm-properly
I don't think using sbatch or srun in the command is a viable or sensible solution.