Thread is old but posting here since google may lead someone here in the future...
if your text is in scripts/foo.rsc and you want to create a script called myscript:
/system script add name=myscript source=[/file get scripts/foo.rsc contents]
This will evaluate the potion in the braces which produces the content of the file and use that content as the value for source. Once you have the script "registered" you can use the /system scheduler to invoke it, etc.
-jp