![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users 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. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling a perl script from a perl script | new2ss | Shell Programming and Scripting | 6 | 05-24-2009 05:03 PM |
| a cron job needs a perl script to execute | Exader | UNIX for Dummies Questions & Answers | 2 | 04-22-2008 03:45 PM |
| Install a cron from a Perl script | garric | Shell Programming and Scripting | 2 | 09-13-2007 05:00 AM |
| How to determine if a script (perl) was called from a CRON job or commandline | jerryMcguire | Shell Programming and Scripting | 2 | 03-23-2006 10:47 AM |
| Perl: Run perl script in the current process | vino | Shell Programming and Scripting | 10 | 12-09-2005 10:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Cron job for Perl script
Although there are many threads on this forum regarding cron, none have specifically answered my question. So hopefully someone can shed some light on what I'm doing wrong..
I have a perl script that I want to run in a cron job. Since I've read that cron doesn't have any environments set, I called the script inside a ksh script to be able to the set environment path (only way I knew how).. After going through this, the cron job still isn't working.. I've manually tested the script(s) many times with success, so I'm thinking that it has to be an environment issue? TIA |
|
||||
|
ok.. the details are below..
crontab -l shows: 1 * * * * /home/<user>/bin/myscript.sh Here is how I have myscript.sh Code:
#!/bin/ksh set PATH=/home/<user>/bin export PATH /home/<user>/bin/perlscript.pl |
|
||||
|
I figured out what I was doing wrong, I had the cron job incorrect. It was running every 1st minute of the hour.. I wanted it to run every minute (for testing).. So it should have been * * * * *, instead of 1 * * * *.. Idiotic, i know..
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|