Public Member Functions | List of all members
JobApplication Class Reference

JobApplication class is used to handle the JMAG-Scheduler application.
Each class object is called from JobApplication class.
. More...

Public Member Functions

void AddJobFromFile (String &xmlFile)
 Internal function. More...
 
void AddJobFromXML (String &xml)
 Internal function. More...
 
void Cancel (String &calculationFolder)
 Internal function. More...
 
void CleanupJobs ()
 Cleans up finished jobs.
 
void CleanupJobsByGroup (String &groupID)
 Cleans up finished jobs. More...
 
String ErrorMessage ()
 Returns content of error message. More...
 
int FinishedJobs ()
 Returns the number of finished jobs. More...
 
String FinishTime (String &calculationFolder)
 Returns the finish time of specified job. More...
 
JobGetJobByFolder (String &calculationFolder)
 Returns Job object. More...
 
bool HasErrorMessage ()
 Returns True as the return value when there is an error message. More...
 
bool HasJob (String &calculationFolder)
 Returns True if the job exists in the scheduler. More...
 
bool HasLocalJobToCreateMesh ()
 Internal function. More...
 
bool IsCanceled (String &calculationFolder)
 Returns True as the return value when a job is canceled. More...
 
bool IsError (String &calculationFolder)
 Returns True as the return value when a job is error. More...
 
bool IsFinished (String &calculationFolder)
 Returns True as the return value when a job is finished. More...
 
bool IsGUIShown ()
 Returns True if the JMAG-Scheduler has a GUI. More...
 
double JobProgress (String &calculationFolder)
 Returns the percentage complete for a running job. More...
 
void Quit ()
 Exits JMAG-Scheduler.
 
void QuitIfIdle ()
 Internal function. More...
 
void ResumeUpdates ()
 Internal function. More...
 
void SetMaxJobs (int maxJobs)
 
void StartSubmitGroup (String &groupId)
 Internal function. More...
 
void StopSubmitGroup (String &groupId)
 Internal function. More...
 
int TotalJobs ()
 Returns the number of jobs registered in JMAG-Scheduler. More...
 
int UnfinishedJobs ()
 Returns the number of unfinished jobs. More...
 

Detailed Description

JobApplication class is used to handle the JMAG-Scheduler application.
Each class object is called from JobApplication class.
.

Use application name "scheduler" to obtain an application object.

Example of calling in VBScript
When starting up as an external application:
jobApp = CreateObject("scheduler.JobApplication")
Example of calling in JScript
When starting up as an external application:
jobApp = new ActiveXObject("scheduler.JobApplication")
Example of calling in Python
When starting up as an external application using win32com:
import win32com.client
jobApp = win32com.client.Dispatch("scheduler.JobApplication")

Member Function Documentation

void JobApplication::AddJobFromFile ( String &  xmlFile)

Internal function.

Deprecated:
void JobApplication::AddJobFromXML ( String &  xml)

Internal function.

Deprecated:
void JobApplication::Cancel ( String &  calculationFolder)

Internal function.

Deprecated:
void JobApplication::CleanupJobsByGroup ( String &  groupID)

Cleans up finished jobs.

Parameters
groupIDID of the group to be deleted
String JobApplication::ErrorMessage ( )

Returns content of error message.

Returns
Error message
int JobApplication::FinishedJobs ( )

Returns the number of finished jobs.

Returns
Number of jobs
String JobApplication::FinishTime ( String &  calculationFolder)

Returns the finish time of specified job.

Parameters
calculationFolderFolder
Returns
Finish time
Job * JobApplication::GetJobByFolder ( String &  calculationFolder)

Returns Job object.

Parameters
calculationFolderFolder running the calculation
Returns
Job object

For more information about the commands for the Job class, see Job .

bool JobApplication::HasErrorMessage ( )

Returns True as the return value when there is an error message.

Returns
Existence of an error message
bool JobApplication::HasJob ( String &  calculationFolder)

Returns True if the job exists in the scheduler.

Parameters
calculationFolderFolder running the calculation
Returns
Whether or not the job exists
bool JobApplication::HasLocalJobToCreateMesh ( )

Internal function.

Deprecated:
bool JobApplication::IsCanceled ( String &  calculationFolder)

Returns True as the return value when a job is canceled.

Parameters
calculationFolderFolder running the calculation
Returns
Whether or not a job is canceled
bool JobApplication::IsError ( String &  calculationFolder)

Returns True as the return value when a job is error.

Parameters
calculationFolderFolder running the calculation
Returns
Whether or not a job is error
bool JobApplication::IsFinished ( String &  calculationFolder)

Returns True as the return value when a job is finished.

Parameters
calculationFolderFolder running the calculation
Returns
Whether or not a job is finished
bool JobApplication::IsGUIShown ( )

Returns True if the JMAG-Scheduler has a GUI.

Returns
Whether or not the GUI is shown
double JobApplication::JobProgress ( String &  calculationFolder)

Returns the percentage complete for a running job.

Parameters
calculationFolderFolder running the calculation
Returns
The percentage completion
void JobApplication::QuitIfIdle ( )

Internal function.

Deprecated:
void JobApplication::ResumeUpdates ( )

Internal function.

Deprecated:
void JobApplication::SetMaxJobs ( int  maxJobs)
Deprecated:
Specifies the number of concurrent execution jobs.
Parameters
Numberof jobs
void JobApplication::StartSubmitGroup ( String &  groupId)

Internal function.

Deprecated:
void JobApplication::StopSubmitGroup ( String &  groupId)

Internal function.

Deprecated:
int JobApplication::TotalJobs ( )

Returns the number of jobs registered in JMAG-Scheduler.

Returns
Number of jobs
int JobApplication::UnfinishedJobs ( )

Returns the number of unfinished jobs.

Returns
Number of jobs