Computing.Net > Forums > Solaris > crontab help needed

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 help needed

Reply to Message Icon

Name: simpsoro
Date: September 9, 2005 at 09:54:51 Pacific
OS: 5.9
CPU/Ram: 8 GB
Comment:

I am having some trouble setting a command to execute in crontab.

I am doing a crontab -e "username" to edit the cron entries for the user I want. I know how to add in minutes, hours, month etc.

The problem I am having I guess is with the proper syntax of the command I want to execute.

I have a command that resides at: /global/web/web/web/generic/admin

The command I run manually from that directory daily is:
./batch.pl --backup -p '(^[A-Za-z0-9_])'

What would be the proper syntax to add that command to a cron job?



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: September 9, 2005 at 13:02:40 Pacific
Reply:

Why don't you create a script like this:

# mybackup.ss script
# whatever your shell is
#!/bin/ksh

export PATH=... # whatever your path is when you run from the command line
cd /global/web/web/web/generic/admin
./batch.pl --backup -p '(^[A-Za-z0-9_])'
# end script


0

Response Number 2
Name: nz_boy
Date: September 18, 2005 at 15:13:36 Pacific
Reply:

here ya go man


* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week
( 0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







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 help needed

Help Needed www.computing.net/answers/solaris/help-needed/2242.html

HELP: Need resetting a Sun E450 www.computing.net/answers/solaris/help-need-resetting-a-sun-e450-/2636.html

KDE, CDE or GNOME help needed www.computing.net/answers/solaris/kde-cde-or-gnome-help-needed/4043.html