Ramp up settings Spindle Speeds in gcode

I have a 3018 that i changed the spindle motor for a slight upgrade, issue is for this spindle motor to work with what i have i cannot just turn the spindle on full speed it needs to ramp up.
The below has been suggested but i need to have it to where every job when it goes from easel to the machine has this for turning on the spindle
(Ramp up spindle speed GCODE to prevent power supply overload)

M03 S1000

G4 P0.5

M03 S2000

G4 P0.5

M03 S5000

G4 P0.5

M03 S10000

(Spindle is now running at full speed)

Can’t you just save that as a text file on your pc and just insert it towards the top of each program where you would turn on the spindle?

Easel controls my machine directly so would need to be added to the part that generates the code so that each part starts with that

I don’t use easel but I imagine it generates a gcode file that you can get access to for adding a subroutine. In Easel, in the “advanced settings” , there is a “generate g code” button. Once you did that and added the speed subroutine, you can then go to file and " import gcode" and run it through easel ( I would imagine that’s how that works).

@MartinW.Mcclary’s Got it. Gcode is just text.