Log in

No account? Create an account

Previous Entry | Next Entry

Further scripting adventures

Documented here so that perhaps if I have to go through this whole rigamarole again, I'll at least have a starting point over the current round of *headbonk*.

Yesterday I spent an inordinate amount of time trying to figure out why I couldn't get a test script to run correctly using "while." Eventually, crying on the inside, I resorted to just typing in the whole sequence at the command line in Cygwin, and things ran just fine. So then what. Was I specifying the incorrect flavor of shell script? I ran around and looked at various variations on shell scripting. That didn't seem to be the problem. After a ridiculous period of time passed, I learned that Notepad++ for Windows is evil (explanation is basically buried in there). I rewrote the script using the vi editor and it worked. Hooray/phew.

Then, back to the matter of scheduling the script to run at a certain time. cron is almost definitely the answer, but for whatever reason I looked at a couple of other things first, before running out of time, because it looked like there were some mildly elaborate steps involved in setting up cron and there should be a simpler way for such a simple project. It seemed like "at" would be a good solution but the Cygwin command line informed me that it's deprecated and I should use "schtasks.exe" instead. Cue some more flailing around with schtasks, where eventually I got things to emit "Success!" except the test script didn't appear to run at the supposed scheduled time. Everything else pointed me at Microsoft's Task Scheduler, but I just can't get behind the notion of dealing with Microsoft GUI junk. "Click this thing in this window and then that thing in that window." Yuck.

So today I shall read some more cron setup tutorials and maybe someday soon I'll manage to schedule some overnight image collection so I can see how bad the glare is from the IR lights on the webcam at night.



( 2 remarks — Remark )
Apr. 28th, 2016 12:44 am (UTC)
I don't think it's just notepad. Windows utilities in general append invisible crap onto everything and nothing works right.
Apr. 28th, 2016 12:44 am (UTC)
Note that there are utilities -- I've written some -- that can strip windows crap from text files. But whyyyyyyy??!?
( 2 remarks — Remark )

Latest Month

October 2018


Page Summary

Powered by LiveJournal.com
Designed by Naoto Kishi