LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Closed Thread
  Search this Thread
Old 03-08-2005, 07:20 AM   #1
tcore
LQ Newbie
 
Registered: Mar 2005
Posts: 4

Rep: Reputation: 0
How can I run the "cu" command under cron?


I have an application where I need to capture (log) data from a serial device connected to the com port of my computer (ttyS0) when I use the shell script (see below), I get connected, a file is created and data is captured.

#!/bin/sh
LOGDATE=`data +%y%m%d`
LOGFILE=/tmp/ttyS0.$LOGDATE
cu –s 2400 –l /dev/ttyS0 dir | tee $LOGFILE0


However when I run this script under cron (root or uucp user ) the only data I see in the log file is "connected" followed by "disconected"

The cron entry I have is

0,10, 20, 30,40,50 * * * * /tmp/captue_port

The script file "capture_port" does runs every 10 min. but each time only connected and disconnected is displayed.

Is there something that I am missing? Would anyone know how to keep the port open to capture this data using the cu command in the shell script?

Tcore
 
Old 03-08-2005, 07:45 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
info to run "cu" command from cron tcore Mandriva 5 12-27-2018 11:34 AM
Shell Script: Find "Word" Run "Command" granatica Linux - Software 5 07-25-2007 07:42 AM
simple "echo > qbc" cron jobs doesn't run shole Linux - Newbie 3 09-23-2006 02:09 PM
system("top") in a C program giving problems when the C prg is run by cron rags2k Programming 1 09-02-2004 03:25 PM
Monthly Archiving Script... help with "date" & "cron" Supp0rtLinux Linux - Software 3 01-03-2003 09:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration