Index: /trunk/FACT++/src/scheduler.cc
===================================================================
--- /trunk/FACT++/src/scheduler.cc	(revision 11215)
+++ /trunk/FACT++/src/scheduler.cc	(revision 11216)
@@ -784,4 +784,11 @@
     boost::thread t(boost::bind(RunThread, &io_service));
 
+    if (conf.Has("cmd"))
+    {
+        const vector<string> v = conf.Get<vector<string>>("cmd");
+        for (vector<string>::const_iterator it=v.begin(); it!=v.end(); it++)
+            shell.ProcessLine(*it);
+    }
+
     //io_service.SetReady();
     if (conf.Has("exec"))
@@ -791,4 +798,7 @@
             shell.Execute(*it);
     }
+
+    if (conf.Get<bool>("quit"))
+        shell.Stop();
 
     shell.Run();                 // Run the shell
@@ -816,5 +826,7 @@
         ("no-dim,d",  po_switch(),    "Disable dim services")
         ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
-        ("exec,e",    vars<string>(), "Execute one or more scrips at startup");
+        ("cmd",       vars<string>(), "Execute one or more commands at startup")
+        ("exec,e",    vars<string>(), "Execute one or more scrips at startup")
+        ("quit,q",    po_switch(),    "Quit after startup");
 
     po::options_description control("Scheduler options");
