Hello,
How to configure crontab?
I want make a crontab to restart server game every day 6:00 AM this need to login specific user and make command ./server restart
user is ; game1
Please help me.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
crontab
Re: crontab
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Re: crontab
Ye but this doesnt work:/
I have this command right now and dont working.
06 1 * * * su - game1 -c /home/game1/game restart > /dev/null 2>&1
I have this command right now and dont working.
06 1 * * * su - game1 -c /home/game1/game restart > /dev/null 2>&1
Re: crontab
have you tried running crontab as game1?
i am guessing you aren't seeing as you are using su? and i am also going to guess game1 needs a password?
i am guessing you aren't seeing as you are using su? and i am also going to guess game1 needs a password?
Desktop: A320M-A PRO MAX, AMD Ryzen 5 3600, GALAX GeForce RTX™ 2060 Super EX (1-Click OC) - Sid, Win10, Arch Linux, Gentoo, Solus
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Laptop: hp 250 G8 i3 11th Gen - Sid
Kodi: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
Re: crontab
From root u dont need password for users.milomak wrote:have you tried running crontab as game1?
i am guessing you aren't seeing as you are using su? and i am also going to guess game1 needs a password?
- ralph.ronnquist
- Posts: 342
- Joined: 2015-12-19 01:07
- Location: Melbourne, Australia
- Been thanked: 6 times
Re: crontab
Maybe it helps with a pair of double-quotes? As in:
Code: Select all
06 1 * * * su - game1 -c "/home/game1/game restart" > /dev/null 2>&1
Re: crontab
Better yet put the calling commands in a shell script, make it executable - chmod 775, and have cron call the script. The permissions then could be changed as needed. may need to add the user to the game's group. or the other way around.