You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Pankaj Kumar <pa...@flextronicssoftware.com> on 2005/09/05 06:21:35 UTC

Crontab entry from perl





Hi,

I want to schedule a perl script in crontab using a CGI script. If i try to
append in the file ie /var/spool/cron/username then apache user does not
have rights to modify this. If i give root rights to apache then it could
be very harmful . how can i make entry into cron from script.


Regards
Pankaj Kumar
Software Engineer
Flextronics Software Systems




"Many of life's failures are people who did not realize how close they were
to success when they gave up ."

***********************  FSS-Unclassified   ***********************
"DISCLAIMER: This message is proprietary to Flextronics Software
Systems Limited (FSS) and is intended solely for the use of the
individual to whom it is addressed. It may contain  privileged or
confidential information and should not be circulated or used for
any purpose other than for what it is intended. If you have received
this message in  error, please notify the originator immediately.
If you are not the intended recipient, you are notified that you are
strictly  prohibited  from  using, copying, altering, or disclosing
the contents of this message.  FSS  accepts no  responsibility  for
loss or damage arising from the use of  the information transmitted
by this email including damage from virus."


Re: Crontab entry from perl

Posted by Badai Aqrandista <ba...@hotmail.com>.
>>I want to schedule a perl script in crontab using a CGI script. If i try 
>>to
>>append in the file ie /var/spool/cron/username then apache user does not
>>have rights to modify this. If i give root rights to apache then it could
>>be very harmful . how can i make entry into cron from script.
>You could have the CGI write out a file in /tmp or other and then have a 
>permenant root run cron or trivial dameon poll this file and add to a users 
>crontab based on the contents.
>
>I don't see what this has to do with modperl though :)

or roll your own cron:

http://search.cpan.org/~roland/Schedule-Cron-0.9/Cron.pm


---
Badai Aqrandista
Cheepy (?)

_________________________________________________________________
SEEK: Over 80,000 jobs across all industries at Australia's #1 job site.    
http://ninemsn.seek.com.au?hotmail


Re: Crontab entry from perl

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
> I want to schedule a perl script in crontab using a CGI script. If i try to
> append in the file ie /var/spool/cron/username then apache user does not
> have rights to modify this. If i give root rights to apache then it could
> be very harmful . how can i make entry into cron from script.
You could have the CGI write out a file in /tmp or other and then have a 
permenant root run cron or trivial dameon poll this file and add to a users 
crontab based on the contents.

I don't see what this has to do with modperl though :)


-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com