JereKuusela-Cron_Job icon

Cron Job

Allows executing commands automatically on the server.

Last updated 2 days ago
Total downloads 12
Total rating 0 
Categories Tools Server-side
Dependency string JereKuusela-Cron_Job-1.0.0
Dependants 0 other mods depend on this mod

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.1901 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured and includes unstripped Unity DLLs.

Preferred version: 5.4.1901

README

Cron Job

Allows executing commands automatically on the server.

Install on the server (modding guide).

Usage

After starting the server, cron.yaml and cron_track.yaml files are created in the config folder.

cron_track.yaml stores the last time a zone was visited. Editing this file is not recommended.

cron.yaml contains the jobs. Jobs are checked every 10 seconds. To understand cron schedules better, check out crontab.guru.

Field jobs includes general jobs. For example:

jobs:
  - command: broadcast center Hello!
    chance: 0.5
    schedule: "0 9 * * *" 

would have a 50% chance of sending a message every day at 9:00 (requires Server Devcommands mod). Times are always in UTC so convert your time zone to that.

Field zone includes zone based jobs. For example:

zone:
  - command: locations_reset Crypt2 zone=$$i,$$j start
    inactive: 60
  - command: vegetation_reset rock4_copper zone=$$i,$$j start
    schedule: "0 9 * * *" 

would reset Burial Grounds if the zone hasn't been visited for 1 hour and reset Copper deposits every day at 9:00 (requires Upgrade World mod).

Following parameters are available:

  • $$i: X index of the targeted zone.
  • $$j: Z index of the targeted zone.
  • $$x: X coordinate of the targeted zone.
  • $$y: Y coordinate of the targeted zone (always 0).
  • $$z: Z coordinate of the targeted zone.

Credits

Thanks for Azumatt for creating the mod icon!

Sources: GitHub

Donations: Buy me a computer

Changelog

  • v1.0
    • Initial release.

Available versions

Please note that the install buttons only work if you have compatible client software installed, such as the Thunderstore Mod Manager. Otherwise use the zip download links instead.

Upload date Version number Downloads Download link  
2022-11-23 1.0.0 12 Version 1.0.0 Install