Scripting in the Shell 
The Shell allows you to access the Repository directly with a scripting language. You can use it to automate repetitive tasks, for example, submit 10 jobs. It can also be used to write or debug your RedwoodScript or Redwood Expression Language code as well.
Note
The shell requires the Scripting module.
By default, the scripting locale is set to English, you can change it to German using the following code:
importPackage(java.util);
jcsSession.setLocale(Locale.GERMAN);
Navigate to .
Enter your code in the lower pane.
Choose Submit Command.
The result of your code will be printed in the upper pane.
Close the tab when you are finished.
To submit one job without parameters, you could use the following code:
{
// Get the job definition object
JobDefinition jobDefinition = jcsSession.getJobDefinitionByName("System_Info");
// Create a job object
Job job = jobDefinition.prepare();
// To submit the job, you need to commit changes to the database
jcsSession.persist();
}
To submit 10 jobs without setting any parameters, you could use the following code:
{
// Get the job definition object
JobDefinition jobDefinition = jcsSession.getJobDefinitionByName("System_Info");
for (int i = 0; i < 10; i++)
{
// Create a job object
jobDefinition.prepare();
}
// To submit the jobs, you need to commit changes to the database
jcsSession.persist();
}