Linked Questions
12 questions linked to/from Command with percent symbols not running in crontab
2
votes
2
answers
3k
views
Command works in terminal but do not work in crontab [duplicate]
i have a problem with executing terminal simple command in crontab.
Terminal view:
touch /home/eugene/`date +%d-%m-%y-%s`.txt
Crontab view:
* * * * * root touch /home/eugene/`date +%d-%...
2
votes
2
answers
2k
views
Cron only runs first part of script [duplicate]
This is the script I use:
find /path/backups/ -type f -mtime -2 -printf '%P\n' | rsync -avz --progress --delete --exclude-from=- -e "ssh -p 512" /path/backups/ me@host:/remote/path/server-backups/
...
0
votes
2
answers
2k
views
Writing a specific format of time in a text file every minute using Cron [duplicate]
I'm rather new to Linux. I recently wanted to learn how to work with Cron. So I wrote the following line to crontab file and it worked:
* * * * * date >> //home/os/system-date.txt
This line will ...
0
votes
0
answers
31
views
Cron, not working [duplicate]
Issue
I have this cronjob.
5 12 * * * find /var/www/html -name "*.php" -o -name "*.htm*" -o -name "*.css" | tar -cf /var/www/export/$(date +"%m-%d-%Y")-backup-fs.tar.gz -T -
But it is not working, ...
0
votes
2
answers
1k
views
Check if a cronjob still writes to a log file
I want to define a cronjob like this:
@hourly /path/to/my/script.sh &> "/path/to/my/logs/$(date +%Y-%m-%d_%H-%M-%S.txt)"
So it should write the output of the script to a log file. ...
-1
votes
1
answer
1k
views
Automatic backups of MySQL database with Cronjob
I would like to backup my MySQL database with a cron job, but I cannot make it work.
This is the code that I am using:
0 2 * * * mysqldump -u root toko_db | gzip > /var/backup/toko_db_`date '+%Y-%m-...
1
vote
2
answers
673
views
right format of date command in crontab
I'm trying to output the current date in this format to a file using /etc/crontab. But crontab doesn't like this formatting. Changing sh to bash doesn't help.
my crontab:
* * * * * root echo "$(...
0
votes
1
answer
171
views
Why won't this command run in cron?
I have this command
echo "$(date +"%T") $(sensors | grep -Eo "[0-9]+\.[0-9]+" | head -1)" >> /home/me/temp_log.txt
that gets some sensor data and puts it into a file and I want to run it ...
0
votes
0
answers
166
views
"tcpdump" command in "crontab" crashes immediately after running the "crontab" jobs
I want crontab to start a tcpdump command, but tcpdump seems to crash immediately after running the crontab jobs. This is the command that I am trying to run:
@reboot /usr/sbin/tcpdump -l enpls0 -G ...
0
votes
0
answers
149
views
'sudo crontab -e' Jobs Are Not Running on Fresh Install of Ubuntu 21.10 (Gnu/Linux 5.13.0-30-Generic X86_64)
I recently did a fresh install of Ubuntu. I am trying to setup some cron jobs using sudo crontab -e
My crontab is as follows:
# Edit this file to introduce tasks to be run by cron.
#
# Each task to ...
0
votes
0
answers
134
views
CRON doesn't run
I had to reinstall a whole stack on an EC2 instance because a colleague mess up the previous one (not able to SSH anymore).
Long Story Short: New EC2 is running.
We have to run 2 jobs by a CRON job. ...
2
votes
1
answer
62
views
Cronjob not running - I tried many suggestions from StackEx - still nothing
I'm about to descend into madness over a cronjob I'm trying to set up. I cannot for the life of me (after spending many hours/effort) figure it out, hope you can help.
I have a Python script at /...