10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi,
on AIX
The following
echo "rr" > myfile_$(date +"%m_%d_%Y").log
gives:
myfile_10_23_2019.log
But in crontab:
00 03 * * 1-6 /u01/script.sh >/tmp/myfile_$(date +"%m_%d_%Y").log 2>&1
gives:
myfile_Wed Oct 23 03:00:00 CEST 2019
How can one have:
myfile_10_23_2019.log (6 Replies)
Discussion started by: big123456
6 Replies
2. Shell Programming and Scripting
Hi ,
I have to schedule one job in crontab, but with two parameters.
1. Sysdate in YYYYMMDD format
2. Sysdate - 7 in YYYYMMDD format
Please suggest how to do that.
Thanks in advance. (1 Reply)
Discussion started by: Anupam_Halder
1 Replies
3. Shell Programming and Scripting
Hello,
i am trying to rename a folder named 'cpbackup' to current date in our WHM Root via setting up a cronetab entry. but the folder does not get renamed on the scheduled time :confused:
*/1 * * * * timestamp=$(date +%m%d%Y);/bin/mv /ac_backups/cpbackup /ac_backups/$timestamp (4 Replies)
Discussion started by: kandyjet
4 Replies
4. Solaris
Hi, i wanted to schedule a backup script to run on 7.30pm every 1st Sat of month MAR, APR, SEP, OCT.
Am i understanding it correctly? Because it doesn't seem to run according to the schedule i needed.
= (7.30pm) & (1st to 7th day of the month) & (MAR, APR, SEP, OCT) & (Sat)
30 19 1-7... (1 Reply)
Discussion started by: beginningDBA
1 Replies
5. Solaris
Hi,
0 9 1,2,3,4,5,6,7 3,4 6
I want a cronjob to run on every 1st Sat of Mar & Apr. But the above schedule is running is running on the 1st 7 days. How do i rectify it?
Thanks in advance. (2 Replies)
Discussion started by: beginningDBA
2 Replies
6. Shell Programming and Scripting
Hi Expert,
I am using TZ for extracting yesterday date and day before yesterday date
example :
date_yes=`TZ="GMT+28" date +'%d-%b-%Y'`
date_dbyes=`TZ="GMT+48" date +'%d-%b-%Y'`
echo $date_yes $date_dbyes
26-May-2010 27-May-2010
I have written a small script for the same named... (1 Reply)
Discussion started by: pritish.sas
1 Replies
7. Shell Programming and Scripting
Hello Experts,
I am facing problem in date command with TZ
test.sh
Output : 26-May-2010 27-May-2010
I scheduled this script everyday at 1 a.m
00 01 * * * sh test.sh
when i was called this script test.sh from crontab , it was giving me other output (1 Reply)
Discussion started by: pritish.sas
1 Replies
8. Shell Programming and Scripting
How to check when was the last time the crontab was updated and also what was the modification done ? (2 Replies)
Discussion started by: mail2sant
2 Replies
9. UNIX for Advanced & Expert Users
Hi
I tried to put a cron job which pipes the logfile appended to date +%d
but it didnt work .
anyone know how to make this happen
thanks in advance
-prasad (7 Replies)
Discussion started by: p4cldba
7 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
There is a requirement to create a file everyday using the cronjob with the date as its name.
any suggestions for the crontab command that'll serve this purpose?
e.g.
02 30 * * * touch abcd.`date +%d.%m.%y`
needless to say.. this doesn't work..
looking fwd to lots of... (7 Replies)
Discussion started by: pranavagarwal
7 Replies