Guide [GUIDE] CronTab Spawn System - Complete Reference for Lucera

[GUIDE] CronTab Spawn System — Complete Reference for LucerA2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

TABLE OF CONTENTS
1. What is the CronTab spawn system?
2. CronTab field anatomy
3. The randomness modifier (~)
4. Format 1 — by day of the week (bosses.properties)
5. Format 2 — by days after death (+N:)
6. Format 3 — XML spawn files (data/spawn)
7. Ready-to-use recipes table
8. Common mistakes
9. RespawnTimePattern vs. RespawnTimeInterval
10. Tips and best practices
11. Quick reference card

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. WHAT IS THE CRONTAB SPAWN SYSTEM?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Lucera's CronTab system lets you schedule Grand Boss spawns with
precise control over timing — including fixed times, specific days
of the week, random windows, and intervals relative to the boss's death.

There are two places where cron patterns are used:
- bosses.properties — Grand Boss configuration (Antharas, Valakas, Baium, etc.)
- data/spawn XML files — common bosses and NPCs


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
2. CRONTAB FIELD ANATOMY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

A CronTab expression has 5 fields separated by spaces:

Code:
minute  hour  day_of_month  month  day_of_week


Field
Position​
Valid valuesExample
Minute
1st​
0 – 59 0 = on the hour
Hour
2nd​
0 – 2320 = 8:00 PM
Day of month
3rd​
1 – 31 or +N:** or +5:*
Month
4th​
1 – 12 or * * = any month
Day of week
5th​
0=Sun 1=Mon...6=Sat or *4 = Thursday


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
3. THE RANDOMNESS MODIFIER (~)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Prefixing the expression with ~ adds a random time window to the spawn,
making it less predictable for players.
Without it, the spawn happens at the exact anchor time.

Syntax:
Code:
~MINUTES:START_MINUTE  hour  ...


Value Meaning
~180:0Random window of 0 to 180 min before anchor time
~60:0 Random window of 0 to 60 min before anchor time
~30:0 Random window of 0 to 30 min before anchor time
(no ~)Fixed spawn, exactly at the defined time

⚠ WARNING: No spaces are allowed inside the spread modifier.
CORRECT:~180:0
WRONG: ~180: 0



━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4. FORMAT 1 — SPAWN BY DAY OF THE WEEK (bosses.properties)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use this when you want the boss to always spawn on a specific weekday,
regardless of when it was killed.

Full syntax:
Code:
BossNameRespawnTimePattern = ~SPREAD:0  HOUR  *  *  DAY_OF_WEEK


Day of week reference:
0 = Sunday4 = Thursday
1 = Monday 5 = Friday
2 = Tuesday6 = Saturday
3 = Wednesday* = Every day


Examples:
Code:
# Antharas — every Thursday at 21:00 (fixed)
AntharasRespawnTimePattern = 0 21 * * 4

# Antharas — every Thursday at 21:00 (up to 3h random window)
AntharasRespawnTimePattern = ~180:0 21 * * 4

# Valakas — every Friday at 20:00 (up to 3h random)
ValakasRespawnTimePattern = ~180:0 20 * * 5

# Baium — every Saturday at 18:00 (up to 2h random)
BaiumRespawnTimePattern = ~120:0 18 * * 6

# Queen Ant — every day at 20:00 (fixed)
QueenAntRespawnTimePattern = 0 20 * * *

# Antharas — Thursday AND Saturday at 21:00 (up to 3h random)
AntharasRespawnTimePattern = ~180:0 21 * * 4,6

TIP: To spawn on two weekdays, separate them with a comma.
Example: * * 4,6 = Thursday and Saturday.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
5. FORMAT 2 — SPAWN BY DAYS AFTER DEATH (+N:)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use this when the boss should respawn N days after being killed,
always at a fixed hour. Useful for bosses that need a multi-day cooldown.

Full syntax:
Code:
BossNameRespawnTimePattern = ~SPREAD:0  HOUR  +DAYS:*  *  *

⚠ IMPORTANT: The +N: format requires 3 asterisks at the end.
The day-of-week format only uses 2. Don't mix them up.

Examples:
Code:
# Valakas — +5 days after death at 20:00 (up to 3h random)
ValakasRespawnTimePattern = ~180:0 20 +5:* * *

# Antharas — +7 days (1 week) after death at 21:00
AntharasRespawnTimePattern = ~60:0 21 +7:* * *

# Boss every 6 days at 20:00 (60 min random window)
BossRespawnTimePattern = ~60:0 20 +6:* * *

# Boss every 14 days at 20:00, always on Saturday
BossRespawnTimePattern = 0 20 +10:* * 6

⚠ NOTE on 14-day Saturday spawns: Use +10, not +14.
The system advances days until it hits the next Saturday.
Using +14 risks skipping a week if the boss dies on Sunday.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6. FORMAT 3 — XML SPAWN FILES (data/spawn)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

For smaller bosses, Orfen, Core, Zaken, Queen Ant, and other NPCs
configured via XML, replace respawn and respawn_rand with respawn_cron.

Before (standard format):
Code:
<spawn name="[queenant_room]">
  <npc id="29001" count="1" respawn="129600" respawn_rand="61200"
       pos="-21610 181594 -5720 0" />
</spawn>

After (with respawn_cron):
Code:
<spawn name="[queenant_room]">
  <npc id="29001" count="1"
       respawn_cron="~120:0 20 +1:* * *"
       pos="-21610 181594 -5720 0" />
</spawn>

Where:
~120:0 = random window of 0 to 120 minutes
20 = anchor time: 20:00
+1:* = +1 day after death
* * = required wildcards (month and day of week)

More XML examples:
Code:
<!-- Core — every day at 20:30 with 1h random -->
<npc id="29006" count="1" respawn_cron="~60:30 20 +1:* * *" pos="..." />

<!-- Orfen — every Monday at 21:00 (fixed) -->
<npc id="29014" count="1" respawn_cron="0 21 * * 1" pos="..." />

<!-- Zaken — every day at midnight (fixed) -->
<npc id="29022" count="1" respawn_cron="0 0 * * *" pos="..." />


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7. READY-TO-USE RECIPES TABLE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

GoalPattern
Every day at 21:00 (fixed) 0 21 * * *
Every day at 21:00 (±30 min random)~30:0 21 * * *
Every day at 20:00 (±3h random) ~180:0 20 * * *
Every Thursday at 21:00 0 21 * * 4
Every Friday at 20:00 (±3h)~180:0 20 * * 5
Thursday and Saturday at 21:00 (±3h)~180:0 21 * * 4,6
+5 days after death at 20:00 (±3h)~180:0 20 +5:* * *
+7 days after death at 21:00 (±1h)~60:0 21 +7:* * *
Every 14 days at 20:00 on Saturday0 20 +10:* * 6
Every 6 days at 20:00 (±1h)~60:0 20 +6:* * *
Every Sunday at 18:00 (fixed)0 18 * * 0
Mon, Wed, Fri at 20:00 (fixed)0 20 * * 1,3,5

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8. COMMON MISTAKES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

WrongCorrectProblem
~180: 0 20 * * *~180:0 20 * * *Space after colon in spread
+5: * * *+5:* * *Space after colon in +N
~180:0 20 +5: * *~180:0 20 +5:* * *Missing wildcard (needs 3)
0 21 * * 70 21 * * 0Sunday is 0, not 7
~60:0 20 +14:* * 60 20 +10:* * 6+14 can skip a week

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9. RESPAWNTIMEPATTERN VS. RESPAWNTIMEINTERVAL
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

In bosses.properties there are two ways to schedule a respawn.
When RespawnTimePattern is set (non-empty), RespawnTimeInterval
is automatically disabled. Only use one at a time.

Code:
# Using INTERVAL (disabled when Pattern is active):
AntharasRespawnTimeInterval = 264

# Using PATTERN (takes priority — the interval above is ignored):
AntharasRespawnTimePattern = ~180:0 21 * * 4

# To disable Pattern and go back to Interval, leave it empty:
AntharasRespawnTimePattern =


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
10. TIPS AND BEST PRACTICES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

- Always use a random window (~) to make spawns less predictable
and keep the server dynamic.

- For events, combine a fixed weekday with a specific hour so
players know when to expect the boss.

- Restart the server or reload configs after editing bosses.properties.

- Test patterns in a dev environment before applying to production.

- Use https://crontab.guru to validate standard cron expressions
before adapting them to Lucera format.

- Add comments (#) in config files to document your changes for
easier maintenance later.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11. QUICK REFERENCE CARD
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Code:
GENERAL FORMAT:
  ~SPREAD:0  HOUR  DAY_OF_WEEK  *  *      (by weekday)
  ~SPREAD:0  HOUR  +DAYS:*  *  *          (by days after death)
  ~SPREAD:0  HOUR  *  *  *                (every day)

DAYS OF WEEK:
  0=Sun  1=Mon  2=Tue  3=Wed  4=Thu  5=Fri  6=Sat

QUICK EXAMPLES:
  0 21 * * *           →  every day at 21:00 (fixed)
  ~180:0 20 * * 5      →  every Friday at 20:00 (±3h)
  ~60:0 21 +7:* * *    →  +7 days after death at 21:00 (±1h)
  0 20 +10:* * 6       →  every 14 days at 20:00 on Saturday

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Based on the official guide by Deazer — lucera2.com
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 
Back
Top