If the script is producing output that will be indexed by Splunk then, yes, you can and should let Splunk run it for you. It's called a "scripted input". Go to Settings->Data inputs->Scripts and click on New Local Script. Answer the questions in the wizard and your script will run as directed with all output sent to the selected index.
If the script is not intended for consumption by Splunk then run it using the Unix cron utility.
--- If this reply helps you, an upvote would be appreciated.