Linked Questions

1
vote
1answer
2k views

Adding timestamp into log file via cronjob command [duplicate]

I try to run git pull command with loging output message to file every 5 minutes. But i got error like this, (root) CMD (cd /var/www/sites/ && git pull origin master | sed -e "s/^/$(date +\")...
0
votes
1answer
876 views

Mplayer cronjob doesn't work [duplicate]

Possible Duplicate: How can I execute date inside of a cron tab job? I made a cronjob to record a stream every friday between 23pm and midnight. Only somehow this doesn't seem to work. the ...
1
vote
1answer
874 views

Usage of '%' in the crontab [duplicate]

I am trying to add a cron job to perform an rsync from a remote server to a (Ubuntu12) local machine & create a log file. Below is the crontab-l 00 18 * * * rsync -a -v --delete -e ssh user@...
2
votes
1answer
2k views

How can I pass a filename containing percent signs (%) as a parameter to a shell script in cron? [duplicate]

We have currently setup a cron job for our new script as below: 46 22 * * * /gzm_common/diagbat9/global/prod/chgstatus.sh /backups/diagbat9/Demantra/output/SK_ITEM_EXTRACT_MFGPRO_$(date +%m%d%y).txt ...
3
votes
1answer
1k views

Using date variable with wget --post-data [duplicate]

For a project I want to use wget in a cron to download a data file. In the wget statement, a start- and enddate have to be defined in the following format: wget --post-data="stns=235&vars=TEMP&...
-1
votes
2answers
426 views

Crontab /bin/sh syntax [duplicate]

I was not able to find the answer for this myself. As cron uses /bin/sh, im getting Syntax error's. I have a cron job, which uses the following command in it 2,17,32,47 * * * * tar -czvf /opt/...
3
votes
1answer
525 views

Shell script not running in crontab [duplicate]

Following is my crontab entry SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin * * * * * /FinalSync.sh $(date --date="5 days ago" +%d_%m_%Y) || echo $? >> log ...
0
votes
1answer
761 views

What is causing my “Unexpected EOF Error while looking for …” error? [duplicate]

I am getting an issue while running a cron job for exporting all databases on my Godaddy Shared hosting Cpanel account. But I have trouble finding the syntax error in below command. Same command is ...
0
votes
1answer
1k views

Cron Job every 55 minutes [duplicate]

I want cron to be run in every 55 mins. I followed the link CronJob every 25 minutes and my crontab command is */5 * * * * [ $(( $(date +%s) / 60 % 55 )) -eq 0 ] && wget http://localhost/...
0
votes
1answer
1k views

cron logging but not working on some commands [duplicate]

Possible Duplicate: How can I execute date inside of a cron tab job? I have a server in Amazon EC2 that I run a backup script on with cron. However, it is not working. To test out if cron is ...
0
votes
1answer
1k views

Why doesn't `date +%F_%T` work in crontab? [duplicate]

When I use time and date at the end of a crontab line like backup`date +%F_%T`.sql or like backup`date%d%m%y`.sql, my crontab command doesn't work. But when I remove it, it works perfectly. Why doesn'...
0
votes
2answers
280 views

cron job not redirect the output to file [duplicate]

I set the following line in cron job under /etc/cron.d/find_old_file * * * * * root [[ -d /var/log/ambari-metrics-collector ]] && find /var/log/ambari-metrics-collector -type f -mtime +10 ...
1
vote
1answer
272 views

Using “crontab -e” [duplicate]

I'm trying to learn a little about cron. I edited crontab -e to have this line: */10 * * * * /usr/bin/touch /home/dkb/Desktop/test.txt It works and I see test.txt changing its "Date Modified" ...
1
vote
2answers
165 views

Script working manually but not in cron - not calculating var? [duplicate]

I am making a GFFS backup script for a school assignment but I've encountered some issues with it. It works like this: /etc/backup/backup.sh PERIOD NUMBER I have added the following lines in cron: ...
-1
votes
1answer
269 views

Cronjobs doesn't work but commands works [duplicate]

I have to command in my cronjob list. I for mysql backup, one for directory cp command. When I run commands, They work. But When I run command the below, I get error: run-parts /etc/cron.daily ...

15 30 50 per page