Our blog

How to Use Scheduled Triggers in Redmine Automation Plugin

Redmine automation scheduler trigger
 

Scheduled Triggers in Redmine Automation Plugin

The Redmine Automation Plugin gives you the power to automate tasks not only when events happen (like issue creation or status change) but also on a schedule. Scheduled triggers are perfect for recurring processes such as sending reminders, closing stale issues, or running regular maintenance tasks.

What Are Scheduled Triggers?

A scheduled trigger lets you run automation rules automatically at a specific time or interval—daily, weekly, monthly, or even every few minutes. This allows Redmine to perform actions on its own, without waiting for a user-driven event.

Example use cases:

  • Close issues that have been inactive for more than 30 days

  • Send weekly reminders about unresolved tickets

  • Reassign overdue tasks every Monday morning

  • Generate recurring subtasks for maintenance activities

How to Set Up a Scheduled Trigger

1. Go to Automation Rules

In Redmine, navigate to:

Administration → Automation Rules → New Rule

2. Choose a Scheduled Trigger

In the Trigger section, select Scheduled.

You can configure it to run every few minutes, daily, weekly, or at a custom interval.

Redmine scheduled trigger

3. Add Conditions (Optional)

Narrow down which issues should be affected. For example:

    • Tracker = Support

    • Status = Open

    • Priority = High

    • Due date = Yesterday

Redmine automation scheduled trigger

 4. Define the Actions

Choose what should happen when the schedule runs. For example:

    • Send notification to project managers

    • Reassign overdue tasks to workers with less workload 

Redmine automation complete scheduled task

5. Save the Rule

Your rule is now active and will execute automatically based on the schedule.

Important: Enable Cron for Scheduled Triggers

Scheduled triggers require a cron job on your Redmine server to run properly.

Add this line to your crontab (adjust the path to your Redmine installation):

				
					*/5 * * * * cd /path/to/redmine && RAILS_ENV=production bundle exec rails runner "AutomationRunScheduledTriggersJob.perform_now" >> log/cron_automation.log 2>&1
				
			

This will check and execute scheduled automations every 5 minutes.

Other installation instructions can be found in the guide on how to install the Automation plugin.

Setting Up Scheduled Automations on Windows Server

Some automation rules use scheduled triggers (e.g., daily tasks, weekly checks, auto-closing stale issues). On Windows Server, use Task Scheduler instead of cron.

Option 1: Using Task Scheduler GUI
  1. Open Task Scheduler (search for taskschd.msc or find it in Administrative Tools)
  2. Click Create Task in the right panel (not “Create Basic Task” — we need more control)
  3. General tab:
    1. Name: Redmine Automation Scheduler
    2. Select “Run whether user is logged on or not”
    3. Check “Run with highest privileges”
    4. Configure for your Windows Server version
  4. Triggers tab:
    1. Click New…
    2. Begin the task: “On a schedule”
    3. Settings: Daily, recur every 1 day
    4. Check “Repeat task every: 5 minutes” for a duration of “Indefinitely”
    5. Ensure “Enabled” is checked
  5. Actions tab:
    1. Click New…
    2. Action: “Start a program”
    3. Program/script: cmd.exe
    4. Add arguments:
      /c cd /d C:\\path\\to\\redmine && set RAILS_ENV=production && bundle exec rails runner “AutomationRunScheduledTriggersJob.perform_now” >> log\\cron_automation.log 2>&1
    5. Start in: C:\\path\\to\\redmine
  6. Settings tab:
    1. Check “Allow task to be run on demand”
    2. Check “Run task as soon as possible after a scheduled start is missed”
    3. Uncheck “Stop the task if it runs longer than”
  7. Click OK and enter the credentials for the user account that runs Redmine
Option 2: Using PowerShell Script

Create a PowerShell script run_automation.ps1:
powershell$RedminePath = “C:\\path\\to\\redmine”
$LogFile = “$RedminePath\\log\\cron_automation.log”

Set-Location $RedminePath
$env:RAILS_ENV = “production”

$timestamp = Get-Date -Format “yyyy-MM-dd HH:mm:ss”
Add-Content $LogFile “[$timestamp] Starting automation job…”

try {
    bundle exec rails runner “AutomationRunScheduledTriggersJob.perform_now” 2>&1 | Add-Content $LogFile
    $timestamp = Get-Date -Format “yyyy-MM-dd HH:mm:ss”
    Add-Content $LogFile “[$timestamp] Job completed successfully”
} catch {
    $timestamp = Get-Date -Format “yyyy-MM-dd HH:mm:ss”
    Add-Content $LogFile “[$timestamp] Error: $_”
}

Then create the scheduled task via PowerShell:
powershell$action = New-ScheduledTaskAction -Execute “powershell.exe” `
    -Argument “-NoProfile -ExecutionPolicy Bypass -File C:\\path\\to\\redmine\\run_automation.ps1” `
    -WorkingDirectory “C:\\path\\to\\redmine”

$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) `
    -RepetitionInterval (New-TimeSpan -Minutes 5) `
    -RepetitionDuration ([TimeSpan]::MaxValue)

$principal = New-ScheduledTaskPrincipal -UserId “SYSTEM” -LogonType ServiceAccount -RunLevel Highest

$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries `
    -DontStopIfGoingOnBatteries `
    -StartWhenAvailable `
    -RunOnlyIfNetworkAvailable

Register-ScheduledTask -TaskName “Redmine Automation Scheduler” `
    -Action $action `
    -Trigger $trigger `
    -Principal $principal `
    -Settings $settings

Option 3: Using schtasks Command Line

Run in an elevated Command Prompt:
batchschtasks /create /tn “Redmine Automation Scheduler” /tr “cmd.exe /c cd /d C:\\path\\to\\redmine && set RAILS_ENV=production && bundle exec rails runner \\”AutomationRunScheduledTriggersJob.perform_now\\” >> log\\cron_automation.log 2>&1″ /sc minute /mo 5 /ru SYSTEM /rl HIGHEST

Verifying the Setup

In Task Scheduler, right-click the task and select Run to test manually
Check log\\cron_automation.log for output
View task history in Task Scheduler (enable it via Action > Enable All Tasks History if needed)

Troubleshooting

Task runs but nothing happens: Verify the Ruby/bundle paths are in the system PATH, or use absolute paths
Permission errors: Ensure the user running the task has read/write access to the Redmine directory
Rails environment issues: You may need to set additional environment variables depending on your Ruby installation (e.g., GEM_HOME, GEM_PATH)

Done!

You’ve just set up a scheduled trigger in Redmine Automation. From now on, Redmine will automatically take care of repetitive time-based tasks—keeping your projects clean, up-to-date, and on track.

Want to see all the other things you can automate? Check the full list of features.

About Redmine Plus

Redmine Plus offers secure, affordable, and fully managed Redmine hosting and customisation services. We empower businesses with tailored Redmine solutions, including expert plugin development, dedicated support, and seamless integration, all while ensuring top-tier security and compliance.

Recent posts

Need to enhance your Redmine?
Get in touch with Redmine specialists
Get in touch

Do you want a more direct contact with our team?

Name
Our policy