Home Man
Search
Today's Posts
Register

Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

crontab NOT working

Tags
advanced

👤 Login to reply

 
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 04: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 10:54 AM..
# 3  
Old 09-26-2006
this works for me:
Code:
[ $(date +%d) -eq $(echo `cal` | awk '{ print $NF-4 }') ] && <cmd goes here>

👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Crontab job is not working ipfreak UNIX for Dummies Questions & Answers 6 03-06-2016 04:39 AM
Crontab is not working BPANDEY Red Hat 5 09-17-2015 10:55 AM
Crontab not working Junaid Subhani Shell Programming and Scripting 7 06-06-2015 03:02 PM
A crontab job not working JDBA SuSE 2 05-05-2014 08:17 AM
Crontab not working krebe Linux 4 02-12-2013 04:50 AM
Crontab not working, please help samantha13 UNIX for Advanced & Expert Users 0 08-02-2012 12:25 PM
crontab is not working!! getrue Red Hat 14 09-08-2011 11:06 AM
crontab is not working. getrue Solaris 6 07-27-2011 12:34 AM
crontab not working rajesh_hv UNIX for Advanced & Expert Users 4 10-28-2008 07:45 AM
crontab not working right kymberm UNIX for Dummies Questions & Answers 3 07-09-2003 04:21 PM


All times are GMT -4. The time now is 01:16 AM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password