Re: Restart CFMX with CFML?

2005-01-31 Thread Jordan Michaels
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jon Block wrote:

|What's the way in which you can restart CFMX service with CFML code
|natively?
|
|Jon
|


Note that you must allow whatever user CFMX/Apache is running as
permissions to execute that command... which opens up a whole new can
of worms

Another way to go about it is to have CFMX write to a shell script and
have that shell script executed by a cron job with the appropriate
permissions.

At any rate, it requires a bit of creative thinking, but should be
possible.

- --
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFB/mX//G4NWP5tBHcRAsHVAKC5A+87BtgB3+KppDkk0OMew9Do1QCeN8Ck
+nYAKY+5hsIM0cscRmfDcHM=
=u6rS
-END PGP SIGNATURE-

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192351
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Restart CFMX with CFML?

2005-01-31 Thread Dave Merrill
I was hopeful that someone had solved this for MX61, but instead I'm
confused. I don't have an 'opt' directory (Windows 2000), and don't find any
files named 'coldfusion.*' that you might be referring to. Is this solution
for unix only? More particulars?

FWIW, we had something for this purpose working in cf45, but it stopped
working when we went from there to mx61. CF would stop, but not restart.

The .bat file we used (with cfexecute) was this, except that we've since
added the ' MX':

-
REM stop all CF services
net stop "ColdFusion MX ODBC Agent"
net stop "ColdFusion MX ODBC Server"
net stop "ColdFusion MX Application Server"
sleep 10
REM start all CF services
net start "ColdFusion MX Application Server"
net start "ColdFusion MX ODBC Server"
net start "ColdFusion MX ODBC Agent"
-

If anyone has any idea how to do this, we'd love to know.

Thanks,

Dave Merrill


> Jon Block wrote:
>
> |What's the way in which you can restart CFMX service with CFML code
> |natively?
> |
> |Jon
> |
> 
>
> Note that you must allow whatever user CFMX/Apache is running as
> permissions to execute that command... which opens up a whole new can
> of worms
>
> Another way to go about it is to have CFMX write to a shell script and
> have that shell script executed by a cron job with the appropriate
> permissions.
>
> At any rate, it requires a bit of creative thinking, but should be
> possible.
>
> - --
> Warm regards,
> Jordan Michaels



~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192442
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Restart CFMX with CFML?

2005-01-31 Thread Brook Davies
===
@echo off
cls
REM ==  RESTART CFMX===
net stop "Coldfusion MX Application Server"
c:
cd \CFUSIONMX\bin
call C:\CFUSIONMX\bin\cfstop.bat
c:\winnt\system32\kill -f jrun.exe
c:\winnt\system32\kill -f jrun.exe
sleep 2
REM call C:\CFUSIONMX\bin\cfstart.bat
net start "ColdFusion MX Application Server"
REM ===
Exit



At 01:19 PM 1/31/2005, you wrote:
>I was hopeful that someone had solved this for MX61, but instead I'm
>confused. I don't have an 'opt' directory (Windows 2000), and don't find any
>files named 'coldfusion.*' that you might be referring to. Is this solution
>for unix only? More particulars?
>
>FWIW, we had something for this purpose working in cf45, but it stopped
>working when we went from there to mx61. CF would stop, but not restart.
>
>The .bat file we used (with cfexecute) was this, except that we've since
>added the ' MX':
>
>-
>REM stop all CF services
>net stop "ColdFusion MX ODBC Agent"
>net stop "ColdFusion MX ODBC Server"
>net stop "ColdFusion MX Application Server"
>sleep 10
>REM start all CF services
>net start "ColdFusion MX Application Server"
>net start "ColdFusion MX ODBC Server"
>net start "ColdFusion MX ODBC Agent"
>-
>
>If anyone has any idea how to do this, we'd love to know.
>
>Thanks,
>
>Dave Merrill
>
>
> > Jon Block wrote:
> >
> > |What's the way in which you can restart CFMX service with CFML code
> > |natively?
> > |
> > |Jon
> > |
> > 
> >
> > Note that you must allow whatever user CFMX/Apache is running as
> > permissions to execute that command... which opens up a whole new can
> > of worms
> >
> > Another way to go about it is to have CFMX write to a shell script and
> > have that shell script executed by a cron job with the appropriate
> > permissions.
> >
> > At any rate, it requires a bit of creative thinking, but should be
> > possible.
> >
> > - --
> > Warm regards,
> > Jordan Michaels
>
>
>
>

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192444
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Restart CFMX with CFML?

2005-01-31 Thread Adrocknaphobia
What version of CF are you running? If you are running J2EE this
should work from \bin.

jrun.exe -restart 

-Adam


On Mon, 31 Jan 2005 16:19:28 -0500, Dave Merrill <[EMAIL PROTECTED]> wrote:
> I was hopeful that someone had solved this for MX61, but instead I'm
> confused. I don't have an 'opt' directory (Windows 2000), and don't find any
> files named 'coldfusion.*' that you might be referring to. Is this solution
> for unix only? More particulars?
> 
> FWIW, we had something for this purpose working in cf45, but it stopped
> working when we went from there to mx61. CF would stop, but not restart.
> 
> The .bat file we used (with cfexecute) was this, except that we've since
> added the ' MX':
> 
> -
> REM stop all CF services
> net stop "ColdFusion MX ODBC Agent"
> net stop "ColdFusion MX ODBC Server"
> net stop "ColdFusion MX Application Server"
> sleep 10
> REM start all CF services
> net start "ColdFusion MX Application Server"
> net start "ColdFusion MX ODBC Server"
> net start "ColdFusion MX ODBC Agent"
> -
> 
> If anyone has any idea how to do this, we'd love to know.
> 
> Thanks,
> 
> Dave Merrill
> 
> 
> > Jon Block wrote:
> >
> > |What's the way in which you can restart CFMX service with CFML code
> > |natively?
> > |
> > |Jon
> > |
> > 
> >
> > Note that you must allow whatever user CFMX/Apache is running as
> > permissions to execute that command... which opens up a whole new can
> > of worms
> >
> > Another way to go about it is to have CFMX write to a shell script and
> > have that shell script executed by a cron job with the appropriate
> > permissions.
> >
> > At any rate, it requires a bit of creative thinking, but should be
> > possible.
> >
> > - --
> > Warm regards,
> > Jordan Michaels
> 
> 
> 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192446
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Restart CFMX with CFML?

2005-01-31 Thread Jordan Michaels
Hi Dave,

Yeah, the CFEXECUTE command I suggested was for *nix. Brook has the 
necessary batch file for Windows. My apologies for not being more clear 
on that aspect. ;)

Warm regards,
Jordan Michaels
Vivio Technologies

Dave Merrill wrote:

>I was hopeful that someone had solved this for MX61, but instead I'm
>confused. I don't have an 'opt' directory (Windows 2000), and don't find any
>files named 'coldfusion.*' that you might be referring to. Is this solution
>for unix only? More particulars?
>
>FWIW, we had something for this purpose working in cf45, but it stopped
>working when we went from there to mx61. CF would stop, but not restart.
>
>The .bat file we used (with cfexecute) was this, except that we've since
>added the ' MX':
>
>-
>REM stop all CF services
>net stop "ColdFusion MX ODBC Agent"
>net stop "ColdFusion MX ODBC Server"
>net stop "ColdFusion MX Application Server"
>sleep 10
>REM start all CF services
>net start "ColdFusion MX Application Server"
>net start "ColdFusion MX ODBC Server"
>net start "ColdFusion MX ODBC Agent"
>-
>
>If anyone has any idea how to do this, we'd love to know.
>
>Thanks,
>
>Dave Merrill
>
>
>  
>
>>Jon Block wrote:
>>
>>|What's the way in which you can restart CFMX service with CFML code
>>|natively?
>>|
>>|Jon
>>|
>>
>>
>>Note that you must allow whatever user CFMX/Apache is running as
>>permissions to execute that command... which opens up a whole new can
>>of worms
>>
>>Another way to go about it is to have CFMX write to a shell script and
>>have that shell script executed by a cron job with the appropriate
>>permissions.
>>
>>At any rate, it requires a bit of creative thinking, but should be
>>possible.
>>
>>- --
>>Warm regards,
>>Jordan Michaels
>>
>>
>
>
>  
>
-- 
Warm regards,
Jordan Michaels
Vivio Technologies
http://www.viviotech.net/
[EMAIL PROTECTED] 



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192449
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Restart CFMX with CFML?

2005-01-31 Thread Steven Erat
I think that when ColdFusion executes a command or bat file via CFEXECUTE
the external script stops when ColdFusion stops.  When ColdFusion calls the
bat file below it gets to the part where the jrun.exe process is killed, and
then because the bat file process is child of the jrun process, the bat file
process also dies.  This would stop your server and then never get to the
part where it restarts.  That's what happens when I run the proposed bat
file.

Another solution is to use the Windows AT scheduler service to schedule a
CFMX stop and a CFMX start in the shortest time in the future as possible, 1
min.  ColdFusion can schedule the stop/start, but Windows will execute the
commands even if CF is shutdown.

See this for a cfm script that calls AT to restart the service:
http://www.talkingtree.com/blog/index.cfm?mode=alias&alias=RestartCFMX

-Steven Erat


> -Original Message-
> From: Brook Davies [mailto:[EMAIL PROTECTED] 
> Sent: Monday, January 31, 2005 4:23 PM
> To: CF-Talk
> Subject: RE: Restart CFMX with CFML?
> 
> ===
> @echo off
> cls
> REM ==  RESTART CFMX===
> net stop "Coldfusion MX Application Server"
> c:
> cd \CFUSIONMX\bin
> call C:\CFUSIONMX\bin\cfstop.bat
> c:\winnt\system32\kill -f jrun.exe
> c:\winnt\system32\kill -f jrun.exe
> sleep 2
> REM call C:\CFUSIONMX\bin\cfstart.bat
> net start "ColdFusion MX Application Server"
> REM ===
> Exit
> 
> 
> 
> At 01:19 PM 1/31/2005, you wrote:
> >I was hopeful that someone had solved this for MX61, but instead I'm
> >confused. I don't have an 'opt' directory (Windows 2000), 
> and don't find any
> >files named 'coldfusion.*' that you might be referring to.

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192467
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Restart CFMX with CFML?

2005-01-31 Thread Dave Merrill
Thanks Steven, we'll check this out. Your experience matches ours; it
appears that the .bat stops when CF does, so the restart doesn't happen when
done that straightforward way.

Brook, are you sure this actually restarts CF? I just tried your .bat code
verbatim here, and CF stops, but doesn't restart.

Dave Merrill


> I think that when ColdFusion executes a command or bat file via CFEXECUTE
> the external script stops when ColdFusion stops.  When ColdFusion
> calls the
> bat file below it gets to the part where the jrun.exe process is
> killed, and
> then because the bat file process is child of the jrun process,
> the bat file
> process also dies.  This would stop your server and then never get to the
> part where it restarts.  That's what happens when I run the proposed bat
> file.
>
> Another solution is to use the Windows AT scheduler service to schedule a
> CFMX stop and a CFMX start in the shortest time in the future as
> possible, 1
> min.  ColdFusion can schedule the stop/start, but Windows will execute the
> commands even if CF is shutdown.
>
> See this for a cfm script that calls AT to restart the service:
> http://www.talkingtree.com/blog/index.cfm?mode=alias&alias=RestartCFMX
>
> -Steven Erat
>
>
> > -Original Message-
> > From: Brook Davies
> >
> > ===
> > @echo off
> > cls
> > REM ==  RESTART CFMX===
> > net stop "Coldfusion MX Application Server"
> > c:
> > cd \CFUSIONMX\bin
> > call C:\CFUSIONMX\bin\cfstop.bat
> > c:\winnt\system32\kill -f jrun.exe
> > c:\winnt\system32\kill -f jrun.exe
> > sleep 2
> > REM call C:\CFUSIONMX\bin\cfstart.bat
> > net start "ColdFusion MX Application Server"
> > REM ===
> > Exit
> >
> >
> >
> > At 01:19 PM 1/31/2005, you wrote:
> > >I was hopeful that someone had solved this for MX61, but instead I'm
> > >confused. I don't have an 'opt' directory (Windows 2000),
> > and don't find any
> > >files named 'coldfusion.*' that you might be referring to.
>
> 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192478
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Restart CFMX with CFML?

2005-01-31 Thread Brook Davies
Oh shit sorry, I wasn't paying enough attention - we use this script via 
the scheduler to restart CFMX. You are right, it will not work from 
CFEXECUTE...

Brook

At 02:54 PM 1/31/2005, you wrote:
>Thanks Steven, we'll check this out. Your experience matches ours; it
>appears that the .bat stops when CF does, so the restart doesn't happen when
>done that straightforward way.
>
>Brook, are you sure this actually restarts CF? I just tried your .bat code
>verbatim here, and CF stops, but doesn't restart.
>
>Dave Merrill
>
>
> > I think that when ColdFusion executes a command or bat file via CFEXECUTE
> > the external script stops when ColdFusion stops.  When ColdFusion
> > calls the
> > bat file below it gets to the part where the jrun.exe process is
> > killed, and
> > then because the bat file process is child of the jrun process,
> > the bat file
> > process also dies.  This would stop your server and then never get to the
> > part where it restarts.  That's what happens when I run the proposed bat
> > file.
> >
> > Another solution is to use the Windows AT scheduler service to schedule a
> > CFMX stop and a CFMX start in the shortest time in the future as
> > possible, 1
> > min.  ColdFusion can schedule the stop/start, but Windows will execute the
> > commands even if CF is shutdown.
> >
> > See this for a cfm script that calls AT to restart the service:
> > http://www.talkingtree.com/blog/index.cfm?mode=alias&alias=RestartCFMX
> >
> > -Steven Erat
> >
> >
> > > -Original Message-
> > > From: Brook Davies
> > >
> > > ===
> > > @echo off
> > > cls
> > > REM ==  RESTART CFMX===
> > > net stop "Coldfusion MX Application Server"
> > > c:
> > > cd \CFUSIONMX\bin
> > > call C:\CFUSIONMX\bin\cfstop.bat
> > > c:\winnt\system32\kill -f jrun.exe
> > > c:\winnt\system32\kill -f jrun.exe
> > > sleep 2
> > > REM call C:\CFUSIONMX\bin\cfstart.bat
> > > net start "ColdFusion MX Application Server"
> > > REM ===
> > > Exit
> > >
> > >
> > >
> > > At 01:19 PM 1/31/2005, you wrote:
> > > >I was hopeful that someone had solved this for MX61, but instead I'm
> > > >confused. I don't have an 'opt' directory (Windows 2000),
> > > and don't find any
> > > >files named 'coldfusion.*' that you might be referring to.
> >
> >
>
>

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192485
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Restart CFMX with CFML?

2005-02-01 Thread Martin Parry
This isn't the correct use of the product but it's a possibility.

I wrote, a long time ago, a utility to monitor CF servers and if an
error occurred (Anyone remember Location Code 25 or 26 errors ?) it
would take a certain course of action.

Now, it's possible to customise the app so it will detect certain text
in a web page. So, what you could do is if you want to restart your CF
service remotely is run a template which then alters the output on a web
page to say something like "Reboot me!" - it'd be something like
http://myserver.com/spuriousurl.cfm - Server Medic will detect that in
its next cycle (User defined timescale) and restart whichever services
you want.. You could even have the message on the page to say "Restart
SQL" which would restart SQL Server.

Server Medic is Free and is a standalone app that doesn't rely on CF.
Get it from http://www.beetrootstreet.com/products/servermedic/index.cfm

Martin Parry
Macromedia Certified Developer
http://www.BeetrootStreet.co.uk


~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192521
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: Restart CFMX with CFML? SMALL CHANGE

2005-01-31 Thread Brook Davies
Sorry, that last bit of code for the restartCFMX.bat file was wrong, try 
this it works, we've been using it for at least a year:


=
@echo off
cls
REM ==  RESTART CFMX===
net stop "Coldfusion MX Application Server"
c:
cd \CFUSIONMX\bin
call C:\CFUSIONMX\bin\cfstop.bat
c:\winnt\system32\kill -f jrun.exe
c:\winnt\system32\kill -f jrun.exe
sleep 1
call "C:\CFUSIONMX\bin\cfstart.bat"
REM ===
Exit


At 01:19 PM 1/31/2005, you wrote:
>I was hopeful that someone had solved this for MX61, but instead I'm
>confused. I don't have an 'opt' directory (Windows 2000), and don't find any
>files named 'coldfusion.*' that you might be referring to. Is this solution
>for unix only? More particulars?
>
>FWIW, we had something for this purpose working in cf45, but it stopped
>working when we went from there to mx61. CF would stop, but not restart.
>
>The .bat file we used (with cfexecute) was this, except that we've since
>added the ' MX':
>
>-
>REM stop all CF services
>net stop "ColdFusion MX ODBC Agent"
>net stop "ColdFusion MX ODBC Server"
>net stop "ColdFusion MX Application Server"
>sleep 10
>REM start all CF services
>net start "ColdFusion MX Application Server"
>net start "ColdFusion MX ODBC Server"
>net start "ColdFusion MX ODBC Agent"
>-
>
>If anyone has any idea how to do this, we'd love to know.
>
>Thanks,
>
>Dave Merrill
>
>
> > Jon Block wrote:
> >
> > |What's the way in which you can restart CFMX service with CFML code
> > |natively?
> > |
> > |Jon
> > |
> > 
> >
> > Note that you must allow whatever user CFMX/Apache is running as
> > permissions to execute that command... which opens up a whole new can
> > of worms
> >
> > Another way to go about it is to have CFMX write to a shell script and
> > have that shell script executed by a cron job with the appropriate
> > permissions.
> >
> > At any rate, it requires a bit of creative thinking, but should be
> > possible.
> >
> > - --
> > Warm regards,
> > Jordan Michaels
>
>
>
>

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192445
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54