Ctrl K
ring2all.com

Cron Profiles Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Configuration Sections
  5. Settings Reference
  6. Common Scenarios & Examples
  7. Limitations & Important Notes
  8. Troubleshooting Tips
  9. Glossary

---

1. Module Overview (Technical)

What Are Cron Profiles?

Cron Profiles is a scheduling configuration module that creates reusable time-based schedules for automated tasks. Profiles define when recurring jobs like backups, reports, or maintenance tasks should run.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Cron Profiles Architecture                        │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Cron Profile Library                                           │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │                                                          │   │
│  │  Profile: Daily Midnight                                 │   │
│  │  ┌────────────────────────────────────────────────────┐  │   │
│  │  │  Expression: 0 0 * * *                             │  │   │
│  │  │  Template: Daily (Midnight)                        │  │   │
│  │  │  Status: Enabled                                   │  │   │
│  │  └────────────────────────────────────────────────────┘  │   │
│  │                                                          │   │
│  │  Profile: Hourly                                         │   │
│  │  ┌────────────────────────────────────────────────────┐  │   │
│  │  │  Expression: 0 * * * *                             │  │   │
│  │  │  Template: Hourly                                  │  │   │
│  │  │  Status: Enabled                                   │  │   │
│  │  └────────────────────────────────────────────────────┘  │   │
│  │                                                          │   │
│  │  Profile: Business Hours                                 │   │
│  │  ┌────────────────────────────────────────────────────┐  │   │
│  │  │  Expression: */15 9-17 * * 1-5                     │  │   │
│  │  │  Template: Custom                                  │  │   │
│  │  │  Status: Enabled                                   │  │   │
│  │  └────────────────────────────────────────────────────┘  │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Used by scheduled tasks                                │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │                                                          │   │
│  │  Backup Jobs ──────────────► "Daily Midnight"           │   │
│  │  Report Generation ───────► "Hourly"                    │   │
│  │  Status Checks ───────────► "Every 5 Minutes"           │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Tables

TablePurpose
public.cron_profilesProfile definitions

Key Files

FileDescription
modules/cronProfiles/Frontend module
---

2. Module Overview (Commercial/Business)

Business Value

Cron Profiles provides reusable scheduling:

Without ProfilesWith Profiles
Duplicate expressionsDefine once, reuse
Error-prone syntaxTemplate presets
No standardizationConsistent schedules
Manual entryVisual builder

Use Cases

  1. Backup Scheduling
- Daily backups

- Weekly full backups

  1. Report Generation
- Hourly reports

- End-of-day summaries

  1. Maintenance Tasks
- Log rotation

- Cache cleanup

  1. Monitoring
- Regular health checks

- Status updates

Feature Highlights

FeatureBenefit
TemplatesPre-built schedules
PresetsQuick selection
CustomFull cron control
ReusableUse across tasks
Enable/DisableToggle profiles
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • Create scheduling profiles
  • Use quick templates
  • Build custom expressions
  • Enable/disable profiles
  • Reuse across modules
  • View last run times

Cron Profiles Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Cron Profiles                                      │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  [+ Add]                                                        │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │ Name            │ Cron Expression │ Template  │ Status   │  │
│  ├─────────────────┼─────────────────┼───────────┼──────────┤  │
│  │ Daily Midnight  │ 0 0 * * *       │ Daily     │ ● Enabled │ │
│  │ Hourly          │ 0 * * * *       │ Hourly    │ ● Enabled │ │
│  │ Every 5 Min     │ */5 * * * *     │ Every 5   │ ● Enabled │ │
│  │ Weekly Sunday   │ 0 0 * * 0       │ Weekly    │ ● Enabled │ │
│  │ Business Hours  │ */15 9-17 * * 1-5│ Custom   │ ○ Disabled│ │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
│  Actions: [✏️ Edit] [🗑️ Delete]                                │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Add/Edit Cron Profile

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Edit Cron Profile                                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ▼ General Information                                          │
│                                                                 │
│  ┌─────────────────────────────────────────────────────────────┐│
│  │                                                             ││
│  │  Name: [Daily Midnight                    ]                ││
│  │                                                             ││
│  │  Template: [Daily (Midnight) ▼]                            ││
│  │    Custom | Every Minute | Hourly | Daily | Weekly | Monthly││
│  │    Every 5/15/30 Minutes                                    ││
│  │                                                             ││
│  │  Enabled: ✓                                                ││
│  │                                                             ││
│  └─────────────────────────────────────────────────────────────┘│
│                                                                 │
│  ▼ Schedule Settings                                            │
│                                                                 │
│  ┌─────────────────────────────────────────────────────────────┐│
│  │                                                             ││
│  │  Cron Expression: 0 0 * * *                                ││
│  │  Format: Min Hr Day Mon Dow                                 ││
│  │                                                             ││
│  │  ─────────────────────────────────────────────              ││
│  │                                                             ││
│  │  Minutes: [Every minute (*) ▼]                             ││
│  │    Every minute (*) | */2 | */5 | */10 | */15 | */30       ││
│  │                                                             ││
│  │  Hours: [Midnight (0) ▼]                                   ││
│  │    Every Hour | */2 | */4 | */6 | */12 | Midnight | Noon   ││
│  │    Business Hours (9-17)                                    ││
│  │                                                             ││
│  │  Day of Month: [Every Day (*) ▼]                           ││
│  │    Every Day | */2 | 1st and 15th                          ││
│  │                                                             ││
│  │  Month: [Every Month (*) ▼]                                ││
│  │    Every Month | Quarterly | Jan & July                    ││
│  │                                                             ││
│  │  Day of Week: [Every Day (*) ▼]                            ││
│  │    Every Day | Mon-Fri | Weekend | Sunday | Monday         ││
│  │                                                             ││
│  └─────────────────────────────────────────────────────────────┘│
│                                                                 │
│  [Save] [Cancel]                                                │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Tips

TIP
Templates: Start with a template, then customize.
TIP
Presets: Use dropdown presets for common intervals.
NOTE
Cron Format: Minute Hour Day Month Weekday

---

4. Configuration Sections

General Information

FieldDescription
NameProfile identifier
TemplateQuick schedule preset
EnabledActive/Inactive

Schedule Settings

FieldDescription
Cron ExpressionFull cron syntax
MinuteMinute preset
HourHour preset
Day of MonthDay preset
MonthMonth preset
Day of WeekWeekday preset
---

5. Settings Reference

Quick Templates

TemplateExpressionDescription
Every Minute Run every minute
Every 5 Minutes/5 Every 5 min
Every 15 Minutes/15 Every 15 min
Every 30 Minutes/30 Every 30 min
Hourly0 Top of each hour
Daily (Midnight)0 0 Midnight daily
Weekly (Sunday)0 0 0Sunday midnight
Monthly (1st)0 0 1 1st of month

Minute Presets

PresetValueDescription
Every minuteRun every minute
Every 2/2Every 2 minutes
Every 5/5Every 5 minutes
Every 10/10Every 10 minutes
Every 15/15Every 15 minutes
Every 30/30Every 30 minutes

Hour Presets

PresetValueDescription
Every HourEvery hour
Every 2/2Every 2 hours
Every 4/4Every 4 hours
Every 6/6Every 6 hours
Every 12/12Every 12 hours
Midnight012:00 AM
Noon1212:00 PM
Business9-179 AM - 5 PM

Day Presets

PresetValueDescription
Every DayDaily
Every Other/2Every 2 days
1st and 15th1,15Bi-monthly

Weekday Presets

PresetValueDescription
Every DayAll days
Mon-Fri1-5Weekdays
Weekend0,6Sat & Sun
Sunday0Sunday only
Monday1Monday only

Cron Expression Format

Plaintext
┌───────────── minute (0-59)
│ ┌───────────── hour (0-23)
│ │ ┌───────────── day of month (1-31)
│ │ │ ┌───────────── month (1-12)
│ │ │ │ ┌───────────── day of week (0-6, 0=Sunday)
│ │ │ │ │
* * * * *

Special Characters

CharacterMeaningExample
Any value = every
/nEvery n/5 = every 5
n-mRange9-17 = 9 to 17
n,mList1,15 = 1 and 15
---

6. Common Scenarios & Examples

Scenario 1: Daily Backup at 2 AM

  1. Add Profile
  2. Name = "Daily 2AM"
  3. Template = Custom
  4. Minute = 0
  5. Hour = 2
  6. Day/Month/Week =
  7. Expression: 0 2
  8. Save

Scenario 2: Every 5 Minutes

  1. Add Profile
  2. Name = "Every 5 Min"
  3. Template = Every 5 Minutes
  4. Save
  5. Expression auto-set: /5

Scenario 3: Business Hours Only

  1. Add Profile
  2. Name = "Business Hours"
  3. Template = Custom
  4. Minute = /15 (every 15 min)
  5. Hour = 9-17 (business hours)
  6. Weekday = 1-5 (Mon-Fri)
  7. Expression: /15 9-17 1-5
  8. Save

Scenario 4: Weekly Sunday Night

  1. Add Profile
  2. Name = "Weekly Sunday"
  3. Template = Weekly (Sunday)
  4. Save
  5. Expression: 0 0 0

---

7. Limitations & Important Notes

Technical Notes

NOTE
Timezone: Schedules run in server timezone.
NOTE
5-Field Format: Standard cron format (no seconds).
WARNING
Test First: Verify expression before production use.

Best Practices

  1. Use Templates: Start with presets
  2. Descriptive Names: Clear profile names
  3. Test Expression: Verify timing
  4. Off-Peak Hours: Schedule heavy tasks at night
  5. Monitor Runs: Check last run status

Common Expressions

Use CaseExpression
Every hour0
Daily at 3 AM0 3
Weekdays 9 AM0 9 1-5
First Monday0 0 1-7 1
Every 10 min/10
---

8. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
Not runningProfile disabledEnable profile
Wrong timeTimezone issueCheck server TZ
Too frequentWrong intervalAdjust expression
Never runsInvalid cronVerify syntax

Verify Expression

Bash
# Install cron expression tester
pip install croniter

# Test expression in Python
python -c "from croniter import croniter; from datetime import datetime; c = croniter('0 2 * * *', datetime.now()); print([c.get_next(datetime) for _ in range(5)])"

Check Cron Jobs

Bash
# List system cron jobs
crontab -l

# View cron log
grep CRON /var/log/syslog

---

9. Glossary

TermDefinition
CronTime-based scheduler
ExpressionSchedule syntax
ProfileReusable schedule
PresetPre-defined value
TemplateQuick schedule
---

Lua Script Status ℹ️

Configuration Module

ComponentStatus
Cron Profilesℹ️ Scheduling templates - no Lua handler required
Cron Profiles is a configuration module. It defines reusable scheduling expressions for other modules. No Lua handlers are used - profiles are referenced by tasks that need scheduling.

---

Documentation last updated: January 2026*

AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?