From: Ben Bleything on
On Mon, Mar 22, 2010 at 7:57 PM, Alex Baranosky <abaranosky(a)hotmail.com> wrote:
> I'll have to look into setting cron jobs on windows.

I'm sure there's a native alternative to cron, but I have no idea what
it is. I suppose in the worst case you could install it as a service
and just sleep in between runs.

Ben

From: Jörg W Mittag on
Ben Bleything wrote:
> On Mon, Mar 22, 2010 at 7:57 PM, Alex Baranosky <abaranosky(a)hotmail.com> wrote:
>> I'll have to look into setting cron jobs on windows.
> I'm sure there's a native alternative to cron, but I have no idea what
> it is.

Task Scheduler, managed through the schtasks.exe command. Something
like:

schtasks /Create /SC HOURLY /TN Reminder /TR C:\Path\to\reminder.rb

jwm
From: Walton Hoops on
On 3/22/2010 9:00 PM, Ben Bleything wrote:
> On Mon, Mar 22, 2010 at 7:57 PM, Alex Baranosky <abaranosky(a)hotmail.com> wrote:
>
>> I'll have to look into setting cron jobs on windows.
>>
> I'm sure there's a native alternative to cron, but I have no idea what
> it is. I suppose in the worst case you could install it as a service
> and just sleep in between runs.
>
> Ben
>
>
Scheduled tasks in XP/2003. Task Scheduler in Vista and newer. I agree
that they are plenty powerful for this. Another option on a Windows box
if your feeling fancy is the win32-service gem for writing Windows
services and rufus-scheduler for cron-like behavior.

From: Alex Baranosky on
Very useful jwm, thanks.

>
> schtasks /Create /SC HOURLY /TN Reminder /TR C:\Path\to\reminder.rb
>
> jwm

--
Posted via http://www.ruby-forum.com/.

From: Alex Baranosky on
So this is what I'm doing so far.

I ran this command at the command line to schedule the task:
schtasks /Create /SC HOURLY /TN Reminder /TR reminder.bat

Then made the reminder.bat as this:
@echo off
rubyw "c:\......rb"

When I run this batch file manually the console doesn't pop up. But
when it runs via the scheduled task it IS having the console window
popup and quickly disappear... Any idea how to get the console window
to never show?
--
Posted via http://www.ruby-forum.com/.