FACT++  1.0
int main ( int  argc,
const char *  argv[] 
)

Definition at line 54 of file triggerschedule.cc.

References Configuration::DoParse(), Configuration::Get(), PrintHelp(), PrintUsage(), DimClient::sendCommand(), Configuration::SetPrintUsage(), Dim::Setup(), and SetupConfiguration().

55 {
56  Configuration conf(argv[0]);
57  conf.SetPrintUsage(PrintUsage);
58  SetupConfiguration(conf);
59 
60  if (!conf.DoParse(argc, argv, PrintHelp))
61  return -1;
62 
63  const string dbname = conf.Get<string>("schedule-database-name");
64 
65  Dim::Setup(conf.Get<string>("dns"));
66 
67  const int rc = DimClient::sendCommand("SCHEDULER/SCHEDULE", dbname.c_str());
68  if (!rc)
69  cerr << "Sending failed!" << endl;
70  else
71  cout << "Command issued successfully." << endl;
72 
73  return !rc;
74 }
void PrintHelp()
static int sendCommand(const char *name, int data)
Definition: diccpp.cxx:1098
void Setup(const std::string &dns="", const std::string &host="")
Definition: DimSetup.cc:160
void PrintUsage()
Commandline parsing, resource file parsing and database access.
Definition: Configuration.h:9
void SetupConfiguration(Configuration &conf)

+ Here is the call graph for this function: