|
#1
|
|||
|
|||
|
I'm trying to get a perl script to run in the cron job to create / update a file every minute at present. The file runs ok when i just access it from a browser and creates the file however when i put it in the cron job it doesn't create a file. Does anyone know why? My cron job and file are below:
* * * * * /usr/bin/perl /home/chrisjc/public_html/auto.pl #!/usr/bin/perl use Fcntl; #The Module print "content-type: text/html \n\n"; #The header sysopen (HTML, 'myhtml.html', O_RDWR|O_CREAT, 0755) or die "No way hoe say!"; printf HTML "<html>\n"; printf HTML "<head>\n"; printf HTML "<title>My Home Page</title>"; printf HTML "</head>\n"; printf HTML "<body>\n"; printf HTML "<p align='center'>Here we have an HTML page with a paragraph.</p>"; printf HTML "</body>\n"; printf HTML "</html>\n"; close (HTML); print "END"; |
|
#2
|
|||
|
|||
|
Fixed...stoopid me!
|
|
#3
|
||||
|
||||
|
If you are on anything less than a dedicated server it would be advised to adjust your cron job to a much higher level if you haven't already done so
HG's terms of service doesn't allow you to run a cron more often than every 15 min.
__________________
best regards, George |
![]() |
| Bookmarks |
| Thread Tools | |
|
|