Using Starfish Scripting Class Properties & Methods in C
See available Starfish Scripting Class Variables, Properties and Methods.
Example using the PreviewMode Property and GetSetting and SaveSetting Methods:
if (!Starfish.PreviewMode)
{
//Set the last run datetime for this user.
Starfish.SaveSetting("Meetings-LRD-"+gUserID, DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss+00:00"));
//Check to see if there are more users to process and if so, restart job.
string uIDs = Starfish.GetSetting("UserIDs");
//This Setting is set in the first Job and will restrict runs to only the Admin user.
bool b = Starfish.GetSetting("AdminUserOnlyTesting_True_OR_False") == "True";
if (b) {
uIDs = "ADMIN";
}
if (runCnt < uIDs.Split(';').Length-1)
{
runCnt++;
Starfish.GotoJob("e8566f56-69cd-4d65-8835-351de24795e3");
} else {
runCnt = 0;
}
}