You should be able to do that with Webcore, although smartthings does not guarantee that instructions that are less than one minute apart will be executed. But there are quite a few people who are using sub minute communications in Webcore, Pistons (a “piston” is what webcore calls a rule).
See the logic FAQ (this is a clickable link)
If you’re willing to have the commands at least one minute apart, you should be able to use the “power allowance” official feature. This allows you to set a switch to always turn itself off a specified time after it is turned on. But the minimum time is one minute.