Computing.Net > Forums > Solaris > crontab

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

crontab

Reply to Message Icon

Name: aboor
Date: November 7, 2002 at 19:47:47 Pacific
OS: solaris 8
CPU/Ram: 10
Comment:

I need to setup a cron job , that job should run only on every month end sunday.
I run as follows but it run every sunday
45 07 24-30 11,12 1 sh /online.txt

if you have any idea pls hlp



Sponsored Link
Ads by Google

Response Number 1
Name: jimbo
Date: November 7, 2002 at 22:09:21 Pacific
Reply:

The only thing i noticed was that you are using a 1 for sunday. I believe "0" is sunday. Try this instead:

45 7 24-30 * 0 sh /online.txt

-jim


0

Response Number 2
Name: kaboorvam
Date: November 10, 2002 at 17:40:35 Pacific
Reply:

HI sorry i give the monday script
but any way for the monday also i have the same script but it never run.

I also try the above script for sunday it runs every sunday.
but i need only on month end sunday
rds
a.k


0

Response Number 3
Name: jimbo
Date: November 11, 2002 at 11:27:40 Pacific
Reply:

As far as the script that never runs on monday, make sure it is executable. Also have a look at /var/cron/log for errors. The script above should only run on sundays at the end of the month since days 24-30 are specified.

-jim


0

Response Number 4
Name: Mark M
Date: November 12, 2002 at 03:38:00 Pacific
Reply:

As above, do chmod+x to your script to make sure it's executable. also just specidy the full path to your script eg: /path/to/script rather than using sh. You can specify sh with #!/bin/sh in your script on the first line.


0

Response Number 5
Name: kaboorvam
Date: November 13, 2002 at 00:46:30 Pacific
Reply:

Hi,
I run the scripts as follows
00 21 24-30 * 0 sh /offline.txt
but this job runs every sunday. It never run
on end of the month.
I dont think path is problem, because if i run manually for some other day ths script will run.

My requiremets is this job should run only on month end sunday

rds
a.k


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: crontab

How to recover my crontab file? www.computing.net/answers/solaris/how-to-recover-my-crontab-file/3794.html

RBAC and crontab www.computing.net/answers/solaris/rbac-and-crontab/2027.html

force system to read crontab file www.computing.net/answers/solaris/force-system-to-read-crontab-file/3654.html