Skip to content
View in the app

A better way to browse. Learn more.

Learn more

Command Scheduler

Featured Replies

  • Administrator

Runs server commands at set times or intervals, including time-of-day configs and weekday schedules.

Command Scheduler 1.0.0 (olds.ro)

Runs server commands at set times of day, on chosen weekdays, or every N minutes, from a simple text file.

Requirements

  • AMX Mod X 1.10 or newer (no extra modules, ReAPI is not needed)
  • Written for AMX Mod X 1.10.0.5490, ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814

Install

  • Compile scripting/olds_cron.sma with amxxpc 1.10 and copy olds_cron.amxx to addons/amxmodx/plugins/.
  • Copy data/lang/olds_cron.txt to addons/amxmodx/data/lang/.
  • Copy configs/olds_cron.ini (the jobs) and configs/plugins/olds_cron.cfg to the same folders under addons/amxmodx/configs/ (if you skip the .cfg, the plugin writes it with the defaults on its first start).
  • Add olds_cron.amxx to addons/amxmodx/configs/plugins.ini.

Jobs (addons/amxmodx/configs/olds_cron.ini), one per line HH:MM|days|command days = * for every day, or names separated by commas: Mon,Tue,Wed,Thu,Fri,Sat,Sun (full names such as Saturday work too) every N minutes|command N = 1 to 1440. The job runs when the clock's minutes are a multiple of N: every 15 minutes = :00, :15, :30, :45. So the spacing stays the same over map changes.

Examples 03:00|*|amx_map de_dust2 20:00|Sat,Sun|mp_timelimit 45; amx_say Weekend evening: longer maps every 15 minutes|amx_say Visit our forum: olds.ro

  • The command is any server console command; join several with ;
  • Empty lines and lines starting with ; or // are skipped.
  • A line that cannot be read is skipped and the AMX Mod X log says which line and why; the other lines still work.
  • At most 64 jobs. The time is the server's own clock.

How the timing works

  • The plugin looks at the clock every 5 seconds and handles each new minute exactly once, also over a map change (the last minute handled is kept in the server's localinfo).
  • If a map change takes the server past a job's minute, the job runs late, as soon as the new map has started (up to 5 minutes late).
  • Each job that runs is written to the AMX Mod X log.

Server commands

  olds_cron_status   lists the jobs and how often each one ran
  olds_cron_reload   reads configs/olds_cron.ini again, without a map change

Settings (addons/amxmodx/configs/plugins/olds_cron.cfg)

  olds_cron_enable  1   1 = run the jobs, 0 = run nothing

Texts are in data/lang/olds_cron.txt (English). No sounds, models or sprites are used.

Credits and licence Written from scratch by alexit (olds.ro workshop) for workshop card LIB-1500. Licence: GNU GPL version 3 or later (GPL-3.0-or-later).

Install

Download the ZIP above and copy its folders into cstrike/. Compile the .sma in addons/amxmodx/scripting with the AMX Mod X 1.10 compiler, put the .amxx in addons/amxmodx/plugins, and add it to plugins.ini.

Files: addons/amxmodx/scripting/olds_cron.sma, test/olds_cron_test.sma

Idea: olds.ro workshop library · Plugin: alexit · Tested automatically (compiled on AMX Mod X 1.8.2, 1.9 and 1.10, played on a CS 1.6 test server)
License: GPL-3.0-or-later. Written for the olds.ro plugin workshop (LIB-1500).

Command Scheduler
v1.0.0Counter-Strike 1.6PluginNot tested yet
AMX Mod X 1.10Server engine HLDS, ReHLDSNeeds ReAPI NoMetamod Metamod-R0 downloads6.8 KBUpdated 10 hours ago
Sign in to download
Pawn (AMX Mod X) · 473 lines
/*
 * Command Scheduler (olds.ro workshop card LIB-1500)
 *
 * Runs server commands at set times of day (on chosen weekdays) or every
 * N minutes, from the file configs/olds_cron.ini.
 *
 * File format, one job per line:
Show all 473 lines

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.