Ady,

It sounds like something may be erroring out behind the scenes.

Sometimes the easiest way to debug what is wrong with a specific cron 
command is to have it write all its results to a text file.

So, you could temporarily do something like this:

0 * * * * /usr/local/dspace/bin/dspace itemcounter > 
/tmp/itemcounter.log 2>&1

(That should be on all one line)

Essentially, that is telling cron to write the results (and error 
messages) to a log file at "/tmp/itemcounter.log".

The next time cron runs the itemcounter, that log should be created and 
there should be some sort of output there.  I'm guessing you'll likely 
see some sort of error message (since it's not working). If you cannot 
figure out the problem based on the error message, then feel free to 
send the error message to this list and we'll see if we can help.

The most likely cause for cron errors (that I've seen) is that something 
is that the PATH (or another environment variable) is not properly set 
(and cron fails to find a program it needs). If this ends up being the 
case, you can often fix it by adding an explicit PATH (or other 
environment variable at the top of your cron. Something like:

# Add all major bin directories to PATH
PATH=/usr/bin:/bin:/usr/local/bin

Hopefully that gives you some things to try out.

- Tim

On 5/29/2013 11:24 PM, Ady Wahyudi Paundu wrote:
> hello,
>
> this might not dspace's problem, but i dont know..
>
> i have cron job for several maintenance and optimization function. one
> of them that can easily be observed is hourly 'dspace itemcounter'.
> for some reason it didn't work, as i can see that even though there are
> new recently added items, the counter didnt change.
> however, if i execute the command manually, it works.  can anybody help
> me with this?
>
> as additional info:
>
> - the '/var/log/cron' didnt show anything unusual, something like this:
> ...
> May 26 19:00:01 repository crond[31025]: (dspace) CMD
> (/usr/local/dspace/bin/dspace itemcounter)
> May 26 19:01:01 repository crond[31085]: (root) CMD (run-parts
> /etc/cron.hourly)
> May 26 20:00:01 repository crond[32355]: (dspace) CMD
> (/usr/local/dspace/bin/dspace itemcounter)
> May 26 20:01:01 repository crond[32406]: (root) CMD (run-parts
> /etc/cron.hourly)
> May 26 21:00:01 repository crond[1323]: (dspace) CMD
> (/usr/local/dspace/bin/dspace itemcounter)
> May 26 21:01:01 repository crond[1340]: (root) CMD (run-parts
> /etc/cron.hourly)
> ...
>
> - there is no cron.allow file,
> - there is one empty cron.deny file
>
> i have also try the cron as root user, still didnt work.
> what went wrong?
>
> Best Regards,
> Ady W. Paundu
>
> ----
> Powered by PTIK UNHAS ~ http://unhas.ac.id/
>
>
> ------------------------------------------------------------------------------
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette: 
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to