Skip to main content

API Functions

qbbackup

PurposeBackup Supervisor state database.
PrototypeQB_BOOL qbbackup()

qbblock

PurposeSets job state to blocked.
PrototypeQB_BOOL qbblock(QbCommand cmd&, QbJobIdList& jobs)

qbblockwork

PurposeBlocks work agenda items.
PrototypeQB_BOOL qbblockwork(QbCommand& cmd, QbWorkIdList& list)

qbbottom

PurposeMoves jobs to end of execution order queue.
PrototypeQB_BOOL qbbottom(QbCommand& cmd, QbJobIdList& jobs)

qbcapturehosts

PurposeForces Supervisor to reacquire Worker hosts.
PrototypeQB_BOOL qbcapturehosts()
ParametersNone

qbcompletework

PurposeSets work agenda items state to complete.
PrototypeQB_BOOL qbcompletework(QbCommand& cmd, QbWorkIdList& list)

qbconfigworkers

PurposeForces Supervisor to send updated configuration information to workers.
PrototypeQB_BOOL qbconfigworkers()
ParametersNone

qbcurrentdomain

PurposeReturns the current domain setting.
PrototypeQbString qbcurrentdomain()
ParametersNone
ResultLinux : NIS domainname
Windows : Windows domain.

qbcurrenttime

PurposeReturns the current time according to the Supervisor.
PrototypeQB_INT qbcurrenttime()
ParametersNone
ResultNumber of seconds since the Unix Epoch (00:00:00, Jan 1, 1970)

qbcurrentuser

PurposeReturns the current user name, regardless of platform.
PrototypeQbString qbcurrentuser()
ParametersNone
ResultString representing user name.

qbdecodepackage

PurposeDecodes job package from encoded string to data structure.
PrototypeQbString qbdecodepackage(const QbString& src)

qberror

PurposeCreates error object.
Prototypeconst QbString& qberror()
ParametersNone

qbfilterparam

PurposeCreates a parameter filter object.
PrototypeQbFilter* qbfilterparam(const QbString& name, const QbString& value)
ParametersnameString containing the name of the filter
valueString containing the filter's value
ResultFilter object.

qbgetpass

PurposeReads command line password entry
Prototypechar* qbgetpass(char* str)
ParametersstrCommand line prompt string
ResultInput string, stripped of terminating newline or carriage return
CommentsWindows only

qbgrouppermissions

PurposeAssigns permissions to user groups.
PrototypeQB_BOOL qbgrouppermissions(const QbString& method, QB_INT perm, const QbString& group, QbStringList& users)
CommentsUser must have Qube administrator privileges.

qbhist

PurposeReturns a list of history objects corresponding to the job query.
PrototypeQB_BOOL qbhist(QbCommand& cmd, QbHistoryList& histlist)
ParameterscmdPointer to a QbCommand object containing job IDs
histlistPointer to a list of QbHistory objects
ResultQB_TRUE if the command executed correctly,
QB_FALSE otherwise

qbhostinfo

PurposeReturns information from list of hosts.
PrototypeQB_BOOL qbhostinfo(QbQuery& query, QbHostList& hosts)

qbhostping

PurposeAttempt to contact arbitrary host.
PrototypeQB_BOOL qbhostping(const QbString& host, QB_INT port, QbString& stats)

qbinterrupt

PurposeForces running jobs back to pending state immediately.
PrototypeQB_BOOL qbinterrupt(QbCommand& cmd, QbJobIdList& jobs)

qbjobid

PurposeCreates new job ID.
PrototypeQB_INT qbjobid()
ParametersNone

qbjobinfo

PurposeGenerates a list of job objects matching query filter.
PrototypeQB_BOOL qbjobinfo(QbQuery& query, QbJobList& jobs)
ParametersqueryPointer to a query object containing a list of queries
jobsList of job objects matching the query
ResultQB_TRUE if the query returned successfully,
QB_FALSE otherwise

qbjobobj

PurposeCreates or retrieves a job description object.
PrototypeQbJob* qbjobobj()
ParametersNone

qbjoborder

PurposeReturns a list of jobs eligible to run on specified hosts.
PrototypeQB_BOOL qbjoborder(QbQuery& query, QbJobList& jobs)

qbkill

PurposeKills jobs.
PrototypeQB_BOOL qbkill(QbCommand& cmd, QbJobIdList& jobs)

qbkillwork

PurposeKills work agenda items.
PrototypeQB_BOOL qbkillwork(QbCommand& cmd, QbWorkIdList& list)

qbmigrate

PurposeInterrupt a running job and force to run on a different host.
PrototypeQB_BOOL qbmigrate(QbCommand& cmd, QbJobIdList& jobs)

qbmodify

PurposeModifies various job parameters.
PrototypeQB_BOOL qbmodify(QbModifyCommand& cmd, QbJobIdList& jobs)

qbping

PurposeAttempt to contact Supervisor
PrototypeQB_BOOL qbping(QbString& stats)

qbpreempt

PurposeForces running jobs back to pending state after agenda item is completed.
PrototypeQB_BOOL qbpreempt(QbCommand& cmd, QbJobIdList& jobs)

qbqueuesummary

PurposeGenerates a summary of overall job activity.
PrototypeQB_BOOL qbqueuesummary(QbStringList& types, QbDataTableList& datatablelist);

qbremove

PurposeRemoves jobs from the Supervisor database cache.
PrototypeQB_BOOL qbremove(QbCommand& cmd, QbJobIdList& jobs)

qbremovehost

PurposeForces Supervisor to remove host from internal tables.
PrototypeQB_BOOL qbremovehost(QbStringList& acc)

qbreportjob

PurposeReturns updated job status to Supervisor.
PrototypeQB_BOOL qbreportjob(const QbStatus& st);

qbreportwork

PurposeReturns updated work agenda item to Supervisor.
PrototypeQB_BOOL qbreportwork(QbWork& wrk)

qbrequestwork

PurposeAsks Supervisor for a work agenda item.
PrototypeQB_BOOL qbrequestwork(QbWork& wrk)

qbrequeue

PurposeResets a failed, complete or killed job back to a initial blocked state.
PrototypeQB_BOOL qbrequeue(QbCommand& cmd, QbJobIdList& jobs)

qbrequeuework

PurposeReset work agenda items to blocked state.
PrototypeQB_BOOL qbrequeuework(QbCommand& cmd, QbWorkIdList& list)

qbreset

PurposeSend signal to Supervisor requesting it to reconnect with its database server.
PrototypeQB_BOOL qbreset()

qbresource

PurposeQuery Supervisor for list of resources.
PrototypeQB_BOOL qbresource(QbResourceList& resources)

qbresume

PurposeSends resume signal to suspended jobs.
PrototypeQB_BOOL qbresume(QbCommand& cmd, QbJobIdList& jobs)
CommentsUnix only

qbresync

PurposeSends signal to Supervisor requesting a resync with slave Supervisor.
PrototypeQB_BOOL qbresync()

qbretry

PurposeResets failed, complete, or killed jobs back to the pending state.
PrototypeQB_BOOL qbretry(QbCommand& cmd, QbJobIdList& jobs)

qbretrywork

PurposeReset work agenda items to pending state.
PrototypeQB_BOOL qbretrywork(QbCommand& cmd, QbWorkIdList& list)

qbshove

PurposeForces Supervisor to reevaluate jobs' position in execution order.
PrototypeQB_BOOL qbshove(QbCommand& cmd, QbJobIdList& jobs)

qbsleep

PurposeSuspends process for specified length of time.
PrototypeQB_VOID qbsleep(QB_INT sec)
Parameterssecseconds
secWindows : milliseconds
ResultNone

qbstats

PurposeReports job statistics
PrototypeQB_BOOL qbstats(QbCommand& cmd, QbLogList& loglist)

qbstderr

PurposeRetrieves job STDERR log file output.
PrototypeQB_BOOL qbstderr(QbCommand& cmd, QbLogList& loglist)

qbstderrstream

PurposeGenerates a continuous output stream of subjob STDERR
PrototypeQB_INT qbstderrstream(QB_INT jobid, QB_INT subid, QB_INT pos, QbString& data)

qbstdout

PurposeRetrieves job STDOUT log file output.
PrototypeQB_BOOL qbstdout(QbCommand& cmd, QbLogList& loglist)
ParameterscmdPointer to a QbCommand object containing job IDs
loglistPointer to a list of QbLog objects corresponding to the job IDs in QbComand
ResultQB_TRUE if the command executed correctly,
QB_FALSE otherwise

qbstdoutstream

PurposeGenerate a continuous output stream of subjob STDOUT
PrototypeQB_INT qbstdoutstream(QB_INT jobid, QB_INT subid, QB_INT pos, QbString& data)

qbsubid

PurposeCreates new subjob ID.
PrototypeQB_INT qbsubid()
ParametersNone

qbsubmit

PurposeSubmits a list of jobs to be dispatched by the Supervisor.
PrototypeQB_BOOL qbsubmit(QbJobList& submit, QbJobList& result, QB_BOOL deferTableCreation = QB_FALSE)
ParameterssubmitPointer to a list of job objects to be submitted
resultPointer to an updated list of job objects submitted to the Supervisor
deferTableCreationWhether the supervisor should defer DB table creation or not (default FALSE)
ResultQB_TRUE if the job list was submitted successfully,
QB_FALSE otherwise

qbsubmitcallback

PurposeSubmit a list of callbacks associated with certain events.
PrototypeQB_BOOL qbsubmitcallback(QbCallbackList& sub, QbCallbackList& cbs)
ParameterssubPointer to a list of callback objects to be submitted
cbsPointer to the updated list of callback objects registered with the Supervisor
ResultQB_TRUE if the callbacks were submitted successfully,
QB_FALSE otherwise

qbsubmitpost

PurposeSubmit a list of post callbacks associated with certain events.
PrototypeQB_BOOL qbsubmitpost(QbPostList& posts)

qbsupervisorconfig

PurposeQuery Supervisor for configuration information.
PrototypeQB_BOOL qbsupervisorconfig(QbConfig& config)

qbsupervisorsetmode

PurposeSets Supervisor operating modes.
PrototypeQB_BOOL qbsupervisorsetmode(const QbString& val)

qbsupervisorunsetmode

PurposeUnsets Supervisor operating modes.
PrototypeQB_BOOL qbsupervisorunsetmode(const QbString& val)

qbsuspend

PurposeSends the SUSPEND signal to running jobs
PrototypeQB_BOOL qbsuspend(QbCommand& cmd, QbJobIdList& jobs)
CommentsUnix only

qbsystem

PurposeExecutes an arbitrary command process.
PrototypeQB_INT qbsystem(QbString cmd)

qbthishostname

PurposeReturns the name of the host, regardless of platform.
PrototypeQbString qbthishostname()
ParametersNone
ResultHost name if it can be determined, "127.0.0.1" (the loopback host address) otherwise.

qbtop

PurposeMoves jobs to the head of execution order queue.
PrototypeQB_BOOL qbtop(QbCommand& cmd, QbJobIdList& jobs)

qbtrigger

PurposeSignal Supervisor with event trigger.
PrototypeQB_BOOL qbtrigger(const QbString& trigger)

qbunblock

PurposeUnblocks jobs so they can begin executing when hosts become available.
PrototypeQB_BOOL qbunblock(QbCommand& cmd, QbJobIdList& jobs)

qbunblockwork

PurposeUnblocks work agenda items.
PrototypeQB_BOOL qbunblockwork(QbCommand& cmd, QbWorkIdList& list)

qbupdatepassword

PurposeUpdate Supervisor with new password information.
PrototypeQB_BOOL qbupdatepassword(const QbString& user, const QbString& domain, const QbString& passwd);
CommentsWindows only.

qbupdateresource

PurposeUpdate Supervisor resource.
PrototypeQB_BOOL qbupdateresource(QbResourceList& acc)

qbuserpermissions

PurposeAssigns access permissions to users.
PrototypeQB_BOOL qbuserpermissions(const QbString& method, QB_INT perm, QbStringList& users)
CommentsUser must have Qube administrator privileges.

qbusers

PurposeReturns current users list.
PrototypeQB_BOOL qbusers(QbAccessList& acc)

qbversion

PurposeReturns Qube version number.
PrototypeQbString qbversion()
ParametersNone
ResultQB_VERSION_NUMBER

qbwaitfor

PurposeSets the job that must reach the done state before starting.
PrototypeQB_BOOL qbwaitfor(QbString& trigger, QB_INT timeout)

qbworkerassign

PurposeSets Worker assignment list.
PrototypeQB_BOOL qbworkerassign(const QbString& host, QbAssignmentList& info)

qbworkerconfig

PurposeQuery Worker for configuration information.
PrototypeQB_BOOL qbworkerconfig(const QbString& name, QbConfig& config)

qbworkerinfo

PurposeGathers information from Worker.
PrototypeQB_BOOL qbworkerinfo(const QbString& host, QbHost& info)

qbworkerlock

PurposeRegisters locks with hosts.
PrototypeQB_BOOL qbworkerlock(QbString& locks, const QbString& host);

qbworkerping

PurposeAttempt to contact specified Worker
PrototypeQB_BOOL qbworkerping(const QbString& host, QbString& stats)

qbworkerupdatevars

PurposeForce Worker to update variable list.
PrototypeQB_BOOL qbworkerupdatevars(QbStringHash& vars, const QbString& host)