LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-11-2013, 04:47 PM   #1
escolom
Member
 
Registered: Apr 2012
Location: San Francisco, cA
Distribution: Ubunto 12.04/Debian 7
Posts: 57

Rep: Reputation: Disabled
Run xmacros from cron?


Quote:
Originally Posted by jsjones85 View Post
Thank you everyone! Your replies have been very useful.
how did you get your xmacro script to run in cron? my log says mine ran but
does not do anything. heelllllllP..its also a script that does some surfing.. I would be interested to see your script.
I know this thread is old but I am hoping

 
Old 06-11-2013, 04:53 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
couldn't you have a script that runs on the hour, every hour, wait one minute then actually run?
 
Old 06-11-2013, 05:20 PM   #3
escolom
Member
 
Registered: Apr 2012
Location: San Francisco, cA
Distribution: Ubunto 12.04/Debian 7
Posts: 57

Original Poster
Rep: Reputation: Disabled
Talking

Quote:
Originally Posted by frieza View Post
couldn't you have a script that runs on the hour, every hour, wait one minute then actually run?
This is hilarias "Micro$oft 1> /dev/null 2> /dev/gossip" send em all to the dump! LMAO!

no its not the increments that's the problem. I have it run when the bank closes for example. its a xmacro script that downloads my checking and credit card data then appends it to a database and then sends me a text message with s summary! helps me watch my pennies
its a great script that runs in terminal

xmacroplay "$DISPLAY" > capone.txt

but when I schedule a .sh file with the contents above...the log says it launched it (/var/log/syslog) but no output, no mouse movements, no logging in to websites like it does in the terminal. someone told me cron doesn't read same files as terminal but I am holding out hope
have you called xmacro from a .sh script successfully? I like to see the syntax.
 
Old 06-11-2013, 08:03 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,697

Rep: Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494Reputation: 2494
cron reads the same files IF it can find the them.
Basically, it usually has a very limited PATH var, so best practice is to specify the complete path to all files/programs/cmds called by cron.
A slightly simpler way is to do that for the actual cron call, then very early on in the script, source a file that sets up the env you require eg source your .bash_profile.
 
Old 06-11-2013, 09:51 PM   #5
escolom
Member
 
Registered: Apr 2012
Location: San Francisco, cA
Distribution: Ubunto 12.04/Debian 7
Posts: 57

Original Poster
Rep: Reputation: Disabled
path

Hi chrism01,
I have a path set in the cron file ..tried that.
but i will give other stuff a try and post my results here
thanks for your ideas.
 
Old 06-11-2013, 11:46 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
Escolom, I split your unrelated post and the relevant responses out of the
long dead thread on TIMING OF CRON EXECUTION.
 
Old 06-12-2013, 11:43 AM   #7
escolom
Member
 
Registered: Apr 2012
Location: San Francisco, cA
Distribution: Ubunto 12.04/Debian 7
Posts: 57

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tinkster View Post
Escolom, I split your unrelated post and the relevant responses out of the
long dead thread on TIMING OF CRON EXECUTION.
ok but my question was about getting xmacro to run under cron. it wasn't a timing question but whatever fits here is fine with me. I did get it to work by rapping my command in a bash - c "my command" on the cron line.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can anyone help me getting this cron to run? dsotm Linux - Newbie 4 05-14-2013 02:43 AM
[SOLVED] Cron run fails at random points, throws: Attempting to re-run cron while.... Nighteyes Linux - Newbie 2 06-22-2012 06:08 AM
script run fine from ./ but when put in cron does not run j-me Linux - Server 6 06-16-2012 11:02 AM
Debian daily cron job won't run, but does run in cron.hourly. sandersch Linux - General 7 05-24-2012 02:50 AM
[SOLVED] Partial list with ls-l in bash script run in cron but full list run from command line redgshost Linux - General 29 01-16-2011 01:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration