Hi,
first I'd like to ask you to please add tags to your threads, see Read Before Posting. For example I'm not sure for which version of Cinema 4D you are asking.
I have moved your thread to the "Cinema 4D Development" category.
I also changed your thread into a question, see Q&A New Functionality.
There are actually a few ways to achieve this.
In all of the following cases, please note, in Script Manager scripts, there are a few predefined global variables (e.g. doc for the active document or op for the active object) you may be using. In the following solutions, these are not available. There even may be no active document (depending on the startup state of Cinema 4D), so you most likely will need load the document via LoadDocument().
You could write your script as a plugin without an actual plugin... I mean, you'll write your code in a "my_plugin.pyp" (except for the suffix, the name is arbitrary) file inside of Cinema 4D's plugins folder, but instead of registering an actual plugin class (like e.g. CommandData), you can just implement PluginMessage() and have your code run for example on C4DPL_PROGRAM_STARTED.
A bit elaborate may be to implement a small plugin, that adds a command line option to run a Python script via command line.
This could roughly look like so:
A third option may be to add to a Python init script. This has changed in version R20. See R20 Startup script location - python_init.py.
Cheers,
Andreas