Author Topic: (SOLVED) Simple script won't run in cron (again)  (Read 1361 times)

Offline ePortel6607

  • Jr. Member
  • **
  • Posts: 28
    • ePortel PC Systems
(SOLVED) Simple script won't run in cron (again)
« on: August 26, 2010, 07:15:04 AM »
I haven't seen any feedback on this issue.  It was originally posted in the Software section and still is.  The original issue was in PCLOS 2009.1 and was solved with a script that told cron how to handle the actual application scripts.

I've had many issue with cron over the past two years.  At this point It doesn't appear that crontab in /etc/ is running at all.  I checked to see when it was last started and it was a day ago...despite that fact that the machine was just booted an hour ago.  If I set a job to run every minute it doesn't run.  This was not the original issue.
The summary of this issue is mostly described in the post below. However part of the problem is even when the etc/contab works, it will not run the scripts properly.  Examples are :

1) The script plays a sound and triggers a Zenity pop and try icon when it executes.  If your logged in as a user you hear the sound but no popup.
2) In KDE3.5 PCLOS 2009.1 the "trigger" scripts cured this issue but in PCLOS 2010.9 I'm back with the original issue.
3) If and when the try Icon showed up (as root is always shows when the script runs) it open Firefox to the correct URL/webpage however Firefox doesn't follow the theme as it does when the SAME EXACTLY script is manually executed.  In other word the "trigger" scripts that the crontab is suppose to run, if click/executed manually firefox theme matches the rest of the OS perfectly (using GTK-kde4, GTK-theme-switch...)  just like you clicked on the Firefox icon on the Desktop but if cron runs the same "trigger" script the theme is completely different.  The aggravation is over the top with issues like this.
I'm testing "at" in a loop and it seems like it may work.  Cron would be nice..but unless you guys know what all this pain is...I have to find a better way.
This is much more information in the post below that may help with figuring this issue out.  
I've gone so far as to manually import the files and directories from Suse 10.3 special version of cron and crontab into pclos   It works a bit better in the fact you can drop a script into the /etc/cron.daily and it will run it...but some of the other issues remain.

This is the original post that has most of the information.  http://www.pclinuxos.com/forum/index.php/topic,60385.0.html

« Last Edit: October 08, 2010, 07:26:52 AM by ePortel6607 »

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: Simple script won't run in cron (again)
« Reply #1 on: August 27, 2010, 06:28:03 AM »
What does /var/log/messages show?

I have tonnes of entries showing execution of cron jobs via crond in mine...perhaps there is something there to indicate why they're not running?

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15316
  • ┌∩┐(◕_◕)┌∩┐
Re: Simple script won't run in cron (again)
« Reply #2 on: August 27, 2010, 07:28:41 AM »
What does /var/log/messages show?

I have tonnes of entries showing execution of cron jobs via crond in mine...p

Yup - me too.
PCLinuxOS 32bit KDE 4.10.1; kernel-3.4.11-pclos1.bfs & 64bit 3.2.18bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

genomega

  • Guest
Re: Simple script won't run in cron (again)
« Reply #3 on: August 27, 2010, 07:47:14 PM »
Have you tried setting it up with task scheduler?

Offline ePortel6607

  • Jr. Member
  • **
  • Posts: 28
    • ePortel PC Systems
(SOLVED) Simple script won't run in cron (again)
« Reply #4 on: October 08, 2010, 07:26:12 AM »
hi guys thanks for the input. It turns out none of the cron jobs were running...at least not the ones in /etc/crontab/ .
All this was caused by the status of the etc/crontab file being set to "executable". I'm not sure how this happened but when I compared permissions from an original crontab file with the one that I was having the problem with I noticed that the original crontab file was NOT set to "executable" and the one that didn't work was set to be "executable" once I corrected this issue the crontab issue disappeared.
Thanks again guys,