That’s a script. Same code
Technically one very interesting difference:
A script is not able to execute in parallel to another instance of itself (you will get an error “script already running”). An automation can have multiple instances of the same automation execute in parallel.