New servers
Moderator: Defcon moderators
trickser wrote:Nice work. Never understood MORs cron approach anyway.
It's very simple, that is a simple example of making a directory
In the cron tab we write :
Code: Select all
1 1 7 * * /hightasks/mkdir1v1/7
In the file 7 we write :
Code: Select all
mkdir /var/www/vhosts/highlatency.net/httpdocs/hl/DEFCON\ 1vs1/Tournament\ Matchups\ Mode\ 1/2013/January/7
Thanks. (MOR), it was a simple file with paths to scripts; it looked like this (I already deleted original, easy to make a new one):
I tried to crontab scripts like:
All without success. Tried to put same stuff in /etc/crontab, restarted it (cd /etc ; crontab stop ; crontab start). There were no error messages, and when used scripts 'standalone', they worked OK.
Code: Select all
* * * * * /var/www/html/2
* * * * * /root/servers/servername/script-to-zip-and-more-recs
I tried to crontab scripts like:
Code: Select all
* * * * * echo It works !
#
Code: Select all
* * * * * echo It works !
Code: Select all
* * * * * echo it works !
All without success. Tried to put same stuff in /etc/crontab, restarted it (cd /etc ; crontab stop ; crontab start). There were no error messages, and when used scripts 'standalone', they worked OK.
^to edit crontabs you should use the crontab command, me thinks, it will tell cron to reread it and it will take care on permissions. Just editing the crontab doesnt work. Also echo doesnt have an effect like this in cron, cron runs in background and echos wont just appear on a shell you are just using.
redirects it to a location where you can find it.
I mean, I dont understand why you would use cron. Cron is an alarm clock, doing things at specific times. But all you wanna do is to handle some files when they appear. And you know exactly when they appear, thats when a game ended, dedcon shuts down and the server loop is about the start a new server. I would put everything in the server loop, unless there is a good reason not to.
Code: Select all
echo "Hello World $(date)" >> /tmp/crontest.txt
redirects it to a location where you can find it.
(MOR) wrote:trickser wrote:Nice work. Never understood MORs cron approach anyway.
It's very simple, that is a simple example of making a directory
I mean, I dont understand why you would use cron. Cron is an alarm clock, doing things at specific times. But all you wanna do is to handle some files when they appear. And you know exactly when they appear, thats when a game ended, dedcon shuts down and the server loop is about the start a new server. I would put everything in the server loop, unless there is a good reason not to.
Last edited by trickser on Mon Jan 07, 2013 9:40 pm, edited 2 times in total.
trickser wrote:^to edit crontabs you should use the crontab command, me thinks, it will tell cron to reread it and it will take care on permissions. Just editing the crontab doesnt work.(MOR) wrote:trickser wrote:Nice work. Never understood MORs cron approach anyway.
It's very simple, that is a simple example of making a directory
Cron is an alarm clock, doing things at specific times...
And for that I use it to run some files in a specific times and like that I work.. Because for me I never was a Linux user and then I did my best to do my work properly with a simple way.
- Forever Young
- level5
- Posts: 1440
- Joined: Tue Dec 16, 2008 9:48 pm
- Location: Black Forest Germany GMT+1
trickser wrote:It obviously works your way and therefor its all right. But as usually I have to warn people about copying the MOR way.
Hahaha, shame
There is no bor on it
Laika didn`t ask for work against boredom.
All praises for these guys ranking:
1. bert_the_turtle
2. Senator
3. MOR/Laika
4. Ace Rimmer
WeAreDefconBastardsNotTerrorists
Let's dance in style
let's dance for a while
heaven can wait
we're only watching the skies
hoping for the best
but expecting the worst
are you gonna drop the bomb or not?
...
Let's dance in style
let's dance for a while
heaven can wait
we're only watching the skies
hoping for the best
but expecting the worst
are you gonna drop the bomb or not?
...
Who is online
Users browsing this forum: No registered users and 10 guests