LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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


Reply
  Search this Thread
Old 03-07-2005, 08:22 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

Last edited by tcore; 03-08-2005 at 07:14 AM.
 
  


Reply



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
How to run my cron command ? Tanc Linux - Newbie 6 05-28-2005 04:58 PM
How can I run the "cu" command under cron? tcore Linux - General 1 03-08-2005 07:45 AM
trying to get cron to run naijaguy Linux - General 12 08-18-2004 05:32 PM
Cron job does not run brentos Linux - General 6 12-12-2003 02:37 PM

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

All times are GMT -5. The time now is 02:44 AM.

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