Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


Closed Thread
  Search this Thread
Old 03-08-2005, 07:20 AM   #1
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.

LOGDATE=`data +%y%m%d`
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?

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

Rep: Reputation: 253Reputation: 253Reputation: 253
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.

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:52 AM.

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