Your ntpdate is running before the network is up and functional.
A better solution might be to use the systemd time synchronisation module rather than creating your own. Or install ntpd and let it manage your system's time.
Use a Process Control System for that matter. supervisord is my usual choice as it offers granular choice over several options like number of restart retries, output redirection, process grouping and launch priority, to name a few...
You could use git blame ("Show what revision and author last modified each line of a file - Annotates each line in the given file with information from the revision which last modified the line. Optionally, start annotating from the given revision.")
See also this.
In particular, using the -L option:
<start> and <end&...
You should never manually touch the files in the cron spool directory. Making changes to the files there would not notify the cron daemon properly, and updates to schedules would not become active until the daemon is restarted. (Some cron daemon implementations may periodically check the spool to see if there are updated files in there, but this behaviour ...
You could use a filter:
git config filter.dropSecondLine.clean "sed '2d'"
Edit/create .git/info/attributes and add:
If you don't want the filter acting on all the files in the repo, modify the * to match an appropriate pattern or filename.
The effect will be the working directory will remain the same, but the repo blobs will not ...
Unfortunately, when you give both a day-of-month and a day-of-week in a crontab entry, this means either one is sufficient. (Didn't know that either, but the manpage says so.) This means we can't simply calculate that the 3rd friday is a friday that is between the 15th and 21st of the month.
Fortunately, the above-linked man page also advises us:
The backslashes do nothing.
The - and + characters do not need to be escaped, because they are not special in any way in the syntax of any shell.
$ set -o xtrace
$ date +%F-%T
+ date +%F-%T
$ date \+%F\-%T
+ date +%F-%T
As you can see in the above trace output, the command that gets executed by the shell is the ...
Write a script and set it to run with cron jobs or systemd timers. Include the appropriate tar command in the script and use the exclude flag for tar to avoid taring the /tar/bkp folder. And use find with the -mmin 120 flag to limit the files tarred to files modified in the last 120 minutes.
After a couple of days I managed to answer my own question. In hindsight it was quite simple.
The slurmd daemon can be started with command line arguments, list them with slurmd -h. In particular , slurmd -n 19 sets the highest nice-value (and thus lowest priority) for the daemon and all its subprocesses. On desktop computers, I simply
Suppose your script is called monitor.sh. There are many commands you can use on linux to send the email.
For example with mail command:
mail -s "Monitor Report" firstname.lastname@example.org < <( bash monitor.sh )
echo "Subject: Monitor Report" | sendmail -v email@example.com < <( bash monitor.sh )
ssmtp firstname.lastname@example.org &...
tput bold writes the character sequence that is to be used to tell the current terminal it is running in to start writing in bold.
It knows the type of the terminal based on the value of the $TERM environment variable. That variable is set by terminal emulators or by getty.
tput queries the termcap or terminfo databases to know what sequence to use for a ...
Your script is running just fine, but it writes to a file called test.log in the current directory. Since you never cd in your script, the current directory technically be anywhere, but it's most likely the user's home directory.
To write to test.log located elsewhere, either cd to the correct directory in the script, or provide the full path to the test....
crontab runs scripts in a different environment from login shell; in particular, PATH could be different or undefined.
Try to use absolute path on the commands (lynx, head ...)
You can get them with
Moreover you should specify path for test.log.
docker-compose can not be found in cron users PATH variable, and therefore can not be run.
One way to fix this is to provide the complete path to the binary.
0 0 * * * cd /home/ec2-user/myapp && /usr/local/bin/docker-compose up
You probably shouldn't overcomplicate the regex.
To remove any possible hashtags at the beginning of lines containing the string run_all.sh, you could do:
crontab -l | sed 's/^#*\(.*run_all\.sh\)/\1/' | crontab -
Unfortunately, I don't have a Solaris system at hand to test it.
You wish to delete a particular crontab entry and replace it with another.
You may dump the existing crontab schedule to a text file using
crontab -l >crontab-old.txt
Assuming that you know that the existing crontab entry is exactly
*/15 * * * * /bin/sh /opt/myscript/myscript.sh > /tmp/myscript.check.out
(with no additional spaces anywhere) you ...
Files with extension .ffs_batch are an xml text associated with FreeFileSync app. Therefore, there are two correct ways to program it in cron (crontab -e):
export DISPLAY=:0; /path_to/FreeFileSync /path_to/file.ffs_batch
/path_to/FreeFileSync /path_to/file.ffs_batch --display=:0.0
The error "Unable to initialize GTK +, is DISPLAY set properly?" it is ...