MyJob Scheduled Plugin
A StellaOps scheduled job plugin template.
Getting Started
- Update the
MyJobOptions.cswith your job-specific configuration - Implement the job logic in
MyJob.cs - Build and sign your plugin
Configuration
Add the following to your appsettings.json:
{
"Plugins": {
"MyJob": {
"Enabled": true,
"CronSchedule": "0 0 * * *",
"MaxExecutionMinutes": 60,
"BatchSize": 100,
"ContinueOnError": false
}
}
}
Cron Schedule Examples
0 0 * * *- Daily at midnight0 */6 * * *- Every 6 hours0 0 * * 0- Weekly on Sunday at midnight0 0 1 * *- Monthly on the 1st at midnight
Building
dotnet build -c Release
Signing
For production use, sign your plugin with Cosign:
cosign sign --key $COSIGN_KEY bin/Release/net10.0/StellaOps.Plugin.MyJob.dll
Testing
dotnet test