Tag Info

Hot answers tagged

4

You can use word notation for more readability : kill -STOP <PID> # pause kill -CONT <PID> # continue working Check man 7 signal


3

A crontab created with crontab -e and listable with crontab -l should not have a user specified for the command. Your entry should read: * * * * * /home/test.sh Or alternatively put the line that you have in /etc/crontab instead. From man 5 crontab (section EXAMPLE SYSTEM CRON FILE): # /etc/crontab: system-wide crontab # Unlike any other crontab you ...


3

They work immediately after saving


2

Common mistake, wrong order of redirection, try this: … sendmail_alive.sh >/tmp/sendmail_alive.log 2>&1 It works like this: file descriptor stdout to /tmp/sendmail_alive.log file descriptor stderr to the value of stdout (/tmp/sendmail_alive.log) With your order, you first point the stderr where originally was stdout and you get the stderr ...


2

Create one cron entry that is: */5 * * * * processA ; sleep 10 ; processB ; sleep 10 ; process C However, I recommend against this. I wouldn't use cron at all. Cron is not that smart. If you tell it to run a job every 5 minutes, and the job takes 6 minutes to run, you will get 2 processes running. By the end of the day you'll have dozens or hundreds of ...


2

There is no option is cron to get to units of seconds. Instead, make use of sleep. For example, in case those are all shell scripts: Set the cron for the 1st script as usual. Add sleep 10 to the second script so that the actual execution starts after 10 seconds. Add sleep 20 to the third... and so on.


1

That crontab entry is invalid, maximum value for hours is 23, not 24. Hence that line is rejected. You should have gotten an error after adding it.


1

The @reboot entry is there for doing things after each reboot. That is not what you want. Cron is not the right tool for this, as it starts something at a specific time and it has no clue about you being logged in or being in the process of logged in. At most a cron job run every minute could look if you are logged in and then take action. It is better to ...


1

I totally forgot that awsetbg is just shell script which uses $HOME variable. awsetbg - awesome wrapper tool to set background So HOME needs to be set. * * * * * ad DISPLAY=:0,HOME=/home/ad /usr/bin/awsetbg -a -r /home/ad/img/beauty/ If you will use directly some app, it will work just with DISPLAY env: * * * * * ad DISPLAY=:0 feh --bg-max ...


1

I guess it's changing HOME=/ to HOME=/home/ad.


1

Your failover system must have some network characteristic that distinguishes it from the real one. Unless you have an especially complex setup, the two servers have different IP addresses. On the recipient machine, check the earliest (last) Received: header: this header indicates which machine sent the email (from the perspective of the first hop). Use a ...


1

Change the 'From' text by editing /etc/passwd to receive mail from 'root at failover' instead of just 'root'. chfn -f 'root at failover' root source: https://wiki.archlinux.org/index.php/SSMTP



Only top voted, non community-wiki answers of a minimum length are eligible