Send an automatic SMS, without the user having to be active

You might be able to do what you want by using a crutch. As Peter indicated, you can not run App Inventor 2 apps in the background. However, you can force the Android to StayAwake

Sorry. App Inventor 2 apps do not have any capability to run in the background. The best one can do is use a Stay Awake routine.

Either use a Stay Awake block routine using a Notifier

or you use Taifun's Tools Extension: App Inventor Extensions: Tools | Pura Vida Apps

Be aware using either an extension or a block routine drains your device battery rapidly. These work around methods are not running the app in the Background, they force the app

screen to stay open.

If the app is running, you might use the Clock to send your sms at a particular time.

What you do depends on why you need to automatically send an SMS at a certain time (variable), without the user having to be active.