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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduling and Emailing a template file 1

Status
Not open for further replies.

webmigit

Programmer
Aug 3, 2001
2,027
US
Hi guys.. I have a problem, and you're gonna love it...

Cold Fusion has a bug, yes I admit it, but CFSCHEDULE (the cf counterpart to cron jobs) sucks, its really buggy... so I'm helping you guys'll help here...

please...

I need to schedule a job to run every day at 6:00 AM and then the job that needs to be run needs to open "..\template.php" and email the contents to the specified email address.. in this case "thicks_fusion@yahoo.com"...

Help, please,
Tony
 
What OS are we talking about? ______________________________________________________________________
TANSTAAFL!
 
Then use cron.

Write a bash script which invokes lynx to copy the source of the file to STDOUT, then pipe that output to sendmail (or whatever your mail app's name is).

Something like:
Code:
#!/bin/bash
lynx -source [URL unfurl="true"]http://yourdomain/template.php[/URL] | sendmail thicks_fusion@yahoo.com


Configure cron to run the script every day at 06:00. ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top