crontab NOT working

Tags
advanced

 
Thread Tools Search this Thread
# 1  
Old 09-26-2006
crontab NOT working

Hi,

I have put the following entry in crontab and it is NOT working

HTML Code:
1 * * * * [ `date +%d` -eq `echo \`cal\` | awk '{print $NF-4}'` ] && /mybin/myjob.sh
As today is Sep 26th, Iam using NF-4 to test.

Thanks

Last edited by baanprog; 09-26-2006 at 05:18 AM..
# 2  
Old 09-26-2006
[edit] I shouldn't post when it's this early in the morning. OK. I see what you're code is doing now. What are the permissions on the script file?

Last edited by Corona688; 09-26-2006 at 11:54 AM..
# 3  
Old 09-26-2006
this works for me:
Code:
[ $(date +%d) -eq $(echo `cal` | awk '{ print $NF-4 }') ] && <cmd goes here>


|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Crontab is not working BPANDEY Red Hat 5 09-17-2015 11:55 AM
Crontab not working Junaid Subhani Shell Programming and Scripting 7 06-06-2015 04:02 PM
Crontab not working krebe Linux 4 02-12-2013 05:50 AM
Crontab not working, please help samantha13 UNIX for Advanced & Expert Users 0 08-02-2012 01:25 PM
crontab not working isaacniu Solaris 6 01-09-2012 06:41 PM
crontab is not working!! getrue Red Hat 14 09-08-2011 12:06 PM
crontab not working shifahim UNIX for Dummies Questions & Answers 8 08-16-2011 09:22 AM
crontab is not working. getrue Solaris 6 07-27-2011 01:34 AM
crontab not working lg123 UNIX for Dummies Questions & Answers 2 04-24-2011 04:47 PM
Crontab entry is not working jramesh1 UNIX for Dummies Questions & Answers 1 07-27-2010 05:07 AM
Crontab and working directory manustone Shell Programming and Scripting 2 02-05-2010 09:20 AM
crontab not working rajesh_hv UNIX for Advanced & Expert Users 4 10-28-2008 08:45 AM
crontab-nmon not working fara_aris AIX 5 06-03-2008 06:08 AM
crontab not working right kymberm UNIX for Dummies Questions & Answers 3 07-09-2003 05:21 PM
cron/crontab not working ezekiel61 UNIX for Dummies Questions & Answers 2 02-05-2003 07:59 AM