fetchmail and watch command
What I'm trying to do is enable the watch command to run a prog named fetchmail.run.
The following command string does not work when run in the background (it works ok from the foreground): watch -n 30 fetchmail.run > /dev/null & * fetchmail.run if ["`ps --User matias | grep fetchmail`" == ""]; then /usr/bin/fetchmail -f ~/.fetchmailrc --mda "procmail -f %F" > /dev/null 2>&1; fi Is there some technique to fix this that's concise and easy to understand? thx., matias. ~ -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines |
fetchmail and watch command
On Thu, 2010-02-11 at 14:36 -0500, matias kaukonen wrote:
> What I'm trying to do is enable the watch command to run a prog named > fetchmail.run. > The following command string does not work when run in the background > (it > works ok from the foreground): > > watch -n 30 fetchmail.run > /dev/null & > > fetchmail.run > if ["`ps --User matias | grep fetchmail`" == ""]; then > /usr/bin/fetchmail -f ~/.fetchmailrc --mda "procmail -f %F" > > /dev/null 2>&1; fi > > Is there some technique to fix this that's concise and easy to > understand? > > thx., > matias. > ~ watch is probably stopping on signal 19 because of tty access. Seems to me that you just want to run this command every 30 seconds. Why not just put a loop in the fetchmail.run script? while sleep 30 do ... done -Chris -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines |
fetchmail and watch command
On Thursday 11 February 2010 14:36:50 matias kaukonen wrote:
> What I'm trying to do is enable the watch command to run a prog named > fetchmail.run. <snip> > Is there some technique to fix this that's concise and easy to understand? Why do you want to do this ? Fetchmail can be run as daemon that will poll every x second, e.g: fetchmail -d 30 -- AC -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines |
| All times are GMT. The time now is 07:21 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.