Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

crontab issue.

Status
Not open for further replies.
Nov 28, 2002
121
US
I'm trying to test my crontab.

setenv EDITOR vi
crontab -e

I add this line passing 1025667 as the argument in my perl script.

32 14 * * * /usr/local/apache/cgi-bin/scrap/scrap_emailer2.pl 1025667

It never runs.
I'm not on the cron.deny list so what wouldn't be an issue.
I double check my time and it doesn't do anything. Is there something I may be overlooking?


 
Is the line there when you do a crontab -l?

Do you have permissions to execute in that directory?

 
I would take a look at my permissions for /var/spool/cron/crontab. I think have got be ROOT to add/change these files.
 
Is the line there when you do a crontab -l?
yes

Do you have permissions to execute in that directory?
yes

When I run it on the command line, it works fine.
Only the cron seems to not call it when I set the correct time.

 
Also, is there a cron.allow and is your account in there?

nope.
 
Are you invoking the correct shell and are you getting any output errors mailed to you?
 
How do I know if I'm invoking the correct shell?

my first line in my perl script is
#!/usr/local/bin/perl -w

Am I suppose to add something to my script to specify the correct shell?
 
How do I get output errors mailed to me?

Also,

I have a bunch of print statements when my script is run manually.
 
not sure what the problem is, I have perl scripts running in the root cron that run fine.

If you have undirected output/errors from a cron job, it would be mailed to you.

Might try a creating a little shell script in your home directory and using it to call the perl script and see if the cron will run it. Other then that not sure....May have to wait for Annhilannic to get back :)
 
Is this a PATH issue? Cron has no significant environment of it's own so you need to set the necessary PATH (and any other important variables) within the shell to tell it explicitly where to find things. HTH.
 
KenCunningham is right, when you get cron jobs failing which work in yout shell it is almost always down to the fact that cron does not source your .profile and set up paths you expect to be there. Also check the cron log to see if any errors are reported and if it has actually run the job.

Try a simple command like 'env > /tmp/crontest.env' from cron to check the environment settings and that cron is working.
 
I got it to work.

I created a csh file that sets SETENV and calls my perl script.
I set the environment variable
TNS_ADMIN to point to the correct path for my database that is called in my perl script.

I was never getting a connection. Cron was working correctly, but the TNS_ADMIN environment variable under my name wasn't used when the cron job was run.
 
I’m trying to remote log onto an application called eNM running on a Solaris 2.5.1 Box from a Windows 2000 using Reflexion X software (XDMCP connection). The connection is made and I’m prompted to enter a user name and password.

However, I get Login incorrect yet the same user name and password work when I use them directly on the Box ! Where could the problem be ? Is there a file that needs to be added edited in the directory containing the application files on the Box ? Does solaris 2.5.2 support XDMCP ?




 
musa95

You might want to repost your question in a new string. It doesn't have anything to do with crontab.

But...
It sounds as if either the application doesn't recognize the username and password, or the user isn't allowed to log in remotely.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top