Skip to content

Unclear of cronjob ran #3105

@b1kks3r

Description

@b1kks3r

Hi guys,

I am working on multiple gameservers but of course first I want to make sure the configuration and first server are running perfectly. That's not the case for my cronjob.

When I typ (as root) grep cron /var/log/syslog | tail -1
Nov 20 08:40:27 DS5146 crontab[171832]: (root) END EDIT (root)

I expected to see some lines about the csgoserver.

Below I'll show only relevant data.

Server details
Master server: listed
Status: ONLINE

Script details
User: csgoserver
Location: /home/csgoserver
Config file: /home/csgoserver/serverfiles/csgo/cfg/csgoserver.cfg

I am trying to setup the cronjobs (root) and this is how I did it;

Login as root

crontab -e
*/5 * * * * su - csgoserver -c '/home/csgoserver/csgoserver monitor' > /dev/null 2>&1
*/30 * * * * su - csgoserver -c '/home/csgoserver/csgoserver update' > /dev/null 2>&1
30 4 * * * su - csgoserver -c '/home/csgoserver/csgoserver force-update' > /dev/null 2>&1
0 0 * * 0 su - csgoserver -c '/home/csgoserver/csgoserver update-lgsm' > /dev/null 2>&1

check if my changes are saved with crontab -l and they do appear

systemctl status cron
systemctl status cron
● cron.service - Regular background program processing daemon Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-11-20 07:43:36 UTC; 53min ago
Docs: man:cron(8)
Main PID: 158787 (cron)
Tasks: 19 (limit: 38283)
Memory: 208.8M
CGroup: /system.slice/cron.service
├─120079 tmux new-session -d -x 80 -y 23 -s csgoserver ./srcds_run -game csgo -usercon -strictportbind -i>
├─120080 sh -c ./srcds_run -game csgo -usercon -strictportbind -ip 0.0.0.0 -port 27015 +clientport 27005 >
├─120081 /bin/sh ./srcds_run -game csgo -usercon -strictportbind -ip 0.0.0.0 -port 27015 +clientport 2700>
├─120088 ./srcds_linux -game csgo -usercon -strictportbind -ip 0.0.0.0 -port 27015 +clientport 27005 +tv_>
└─158787 /usr/sbin/cron -f

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions