static bool clientscmd(UAContext *ua, const char *cmd);
static bool msgscmd(UAContext *ua, const char *cmd);
static bool poolscmd(UAContext *ua, const char *cmd);
+static bool schedulescmd(UAContext *ua, const char *cmd);
static bool storagecmd(UAContext *ua, const char *cmd);
static bool defaultscmd(UAContext *ua, const char *cmd);
static bool typescmd(UAContext *ua, const char *cmd);
{ NT_(".pools"), poolscmd, NULL, true},
{ NT_(".quit"), dot_quit_cmd, NULL, false},
{ NT_(".putfile"), putfile_cmd, NULL, false}, /* use @putfile */
+ { NT_(".schedule"), schedulescmd, NULL, false},
{ NT_(".sql"), sql_cmd, NULL, false},
{ NT_(".status"), dot_status_cmd, NULL, false},
{ NT_(".storage"), storagecmd, NULL, true},
return true;
}
+static bool schedulescmd(UAContext *ua, const char *cmd)
+{
+ SCHED *sched;
+ LockRes();
+ foreach_res(sched, R_SCHEDULE) {
+ if (acl_access_ok(ua, Schedule_ACL, sched->name())) {
+ ua->send_msg("%s\n", sched->name());
+ }
+ }
+ UnlockRes();
+ return true;
+}
+
static bool storagecmd(UAContext *ua, const char *cmd)
{
STORE *store;