Home > Archive > PERL Beginners > November 2007 > Freebsd + cron job +perl script
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Freebsd + cron job +perl script
|
|
| Francis Provencher 2007-11-29, 7:02 pm |
| Hi all,
I'v add a perl script in my crontab (To execute with root rigth)
If i execute the perl script in command line, all work fine.
Here the log from /var/log/cron
Nov 29 14:55:00 (NameOfTheServer) /usr/sbin/cron[16782]: (root) CMD
(/root/Scripts/update.pl)
Cron execute the job....
if i make the "top" command....;
16785 root 1 8 0 6296K 5764K wait 0:01 0.00%
perl5.8.8
The script stay in "wait" mode....
Some one can help me ton find why these script wont finish...
(I'v no error in /var/log/message)
Thanks for your help!
Francis Provencher
Ministère de la Sécurité publique du Québec
Direction des technologies de l'information
Division de la sécurité informatique
Tél: 1 418 646-3258
Courriel: Francis.provencher@Msp.gouv.qc.ca
CEH - Certified Ethical Hackers
SSCP - System Security Certified Practitionner
Sec+ - Security +
| |
| Tom Phoenix 2007-11-29, 7:02 pm |
| On 11/29/07, FRANCIS PROVENCHER
> I'v add a perl script in my crontab (To execute with root rigth)
Root rights? Well, if you must.
> If i execute the perl script in command line, all work fine.
If the problem only shows up under cron, the environment is different
under cron. The current working directory, environment variables, and
other things may be different. Your program, it seems, makes some
mistaken assumption about the environment. Maybe it stops to ask the
user for input, for example; but that won't work under cron.
Somebody will have to look at the source to see what environmental
assumption it contains. Did you think we could debug your program
without even seeing it?
Cheers!
--Tom Phoenix
Stonehenge Perl Training
| |
| Patmarbidon 2007-11-30, 4:00 am |
| Patrick MARION a écrit :
Can you tell more about your script.
The first thing about difference between command line dand cron is about
environment or perhaps STDIN.
Perhaps you can make a trace with several "print tracexxx" at several
critical places in your script.
Without redirection to an explicit file all output of a cron script are
routed with mail to the cron user.
FRANCIS PROVENCHER a écrit :
> Hi all,
>
> I'v add a perl script in my crontab (To execute with root rigth)
>
> If i execute the perl script in command line, all work fine.
>
>
> Here the log from /var/log/cron
>
> *Nov 29 14:55:00 (NameOfTheServer) /usr/sbin/cron[16782]: (root) CMD
> (/root/Scripts/update.pl)*
>
> Cron execute the job....
>
>
> if i make the "top" command....;
>
> *16785 root 1 8 0 6296K 5764K wait 0:01 0.00% perl5.8.8*
> **
> The script stay in "wait" mode....
>
> Some one can help me ton find why these script wont finish...
> (I'v no error in /var/log/message)
>
> Thanks for your help!
>
>
>
> Francis Provencher
> Ministère de la Sécurité publique du Québec
> Direction des technologies de l'information
> Division de la sécurité informatique
> Tél: 1 418 646-3258
> Courriel: Francis.provencher@Msp.gouv.qc.ca
> <mailto:Francis.provencher@Msp.gouv.qc.ca>
>
> CEH - Certified Ethical Hackers
> SSCP - System Security Certified Practitionner
> Sec+ - Security +
>
|
|
|
|
|