On Monday, April 15, 2002, at 08:52 , Ron Goral wrote:
> It is a Linux server. Sorry I didn't make it more clear, not only do I > not > have telnet access, neither do I have command line access. As for the man > on crontab, I could not locate that nor is it covered at www.Perl.org. > However, there is a nice little tutorial at > http://www.superscripts.com/tutorial/crontab.html. (Should have done a > web > search first before bothering you good people.) This sounds a bit like 'cogito ergo pallamino' - getting de carte before de horse - p0: For cron to 'run' a job - it will need to be installed in "some users" account - hence if you can not login and get a 'command line'/'shell' - then cron would not be able to run the 'job' as you. what happens when you 'create a cron job' is that a file on the unix box on a 'per user' basis is put into /var/spool/cron/<user> and will generically look like say: [root@disky cron]# cat root # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/tmp/crontab.2437 installed on Wed Mar 20 14:56:56 2002) # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $) 0 0 * * * /usr/local/lib/smail/savelog -c 30 /var/smail/log/logfile 0 0 * * 1 /home/lyris/bin/lyris dbpack 0 3 * * * cd /backups/dumps ; /backups/dumps/bin/do_dump [root@disky cron]# this 'per user' approach also means that when cron runs the job, it will generate email to that user. > Subject: How to do a cron job? > > Can someone point me toward resources on how to conduct a "cron job" in > script? I have no access to the server via telnet, so this would have to > be script based. I am using the Perl command "sleep $sec" now, but there > may be some issues with > that. Self perpetuation can be a bad thing for system resources. So you might want to re-think the problem.... Cron is more for problems like, "I want to run this script every day, week, month...." where you know that any given run of the script will finish before there is any chance of the next run. { I get concerned about using cron to run jobs any faster than once an hour.... that way can lead to the need to get into processes lock outs - so that the new one will not start if another one is still running... } If your script 'works' each time - and you want to make sure that it will always be run once a 'reasonably large interval' - then you need to get it installed on the 'server' and have an account on the server so that you can do the 'crontab -e' to edit your crontab file and put in your iterator like above..... 0 3 * * * MyCoolScript and it will run at 3am each day.... So we are back to the problem - why are you in a 'sleep' cycle in your script? Is it a matter that it needs to be continuosly running? ciao drieux --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]