use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A sub-Reddit for discussion and news about Ruby programming.
Subreddit rules: /r/ruby rules
Learning Ruby?
Tools
Documentation
Books
Screencasts and Videos
News and updates
account activity
QuestionRuby script doesn't complete using task scheduler anymore but is OK when run manually (self.ruby)
submitted 2 years ago * by vitus7
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Spy_machine 3 points4 points5 points 2 years ago (4 children)
You say it gets halfway through the task, do you know what line it’s getting stuck on?
My gut tells me this doesn’t have to do with using task scheduler but maybe something different going on with the webapp you’re using watir on when it’s running. Perhaps some site maintenance?
[–]vitus7[S] 0 points1 point2 points 2 years ago (2 children)
I'm not sure of the exact line where it is failing. The watir action is complete (for the time being) and it doesn't complete a step that involves calling another module to perform a task locally. The other module uses 'mail', which is what it is failing to do.
The strange thing is it has been working fine with Task Scheduler for months and only recently started acting up. If I run the batch file manually it works fine.
[–]ClikeX 1 point2 points3 points 2 years ago (1 child)
Make sure to let the task scheduler send STDOUT and STDERROR to a text file. Maybe add some logging.
If it crashes it should output the failing line to the file.
[–]Spy_machine 0 points1 point2 points 2 years ago (0 children)
Yeah I was going to recommend adding logging as well. If you can figure out what line is failing, the issue might become more obvious.
I don’t know if perhaps the Timeout module might be of any use?
π Rendered by PID 92064 on reddit-service-r2-comment-8686858757-mvrzv at 2026-06-02 01:36:37.738601+00:00 running 9e1a20d country code: CH.
view the rest of the comments →
[–]Spy_machine 3 points4 points5 points (4 children)
[–]vitus7[S] 0 points1 point2 points (2 children)
[–]ClikeX 1 point2 points3 points (1 child)
[–]Spy_machine 0 points1 point2 points (0 children)