Attention: PROnetworks has upgraded our forum from phpbb2 to phpbb3!!

Please head over to our new converted forum at: http://www.pronetworks.org/forums/

This old forum will remain 'read-only' until approximately February 2009. We look forward to seeing you at the new forum!
Author Message
adnanmadi
Adnan Madi
PostPosted: Wed Nov 21, 2007 12:13 am Reply with quote

PRO Level 15
 
 


Joined: 14 Mar 2005
Posts: 1084
Location: Ramallah, Palestine
saywhat Hello Guys,

I have set up this cronjob

0,5,10,15,20,25,30,35,40,45,50,55 * * * * (mv /some/path/* /other/path/ > output.txt)

the weird thing is: the files are moved every certain amount of seconds not every 5 minutes. but the output file is created in the correct time i.e. each 5 minutes.

any ideas?

something else, I tried to use */5 instead of mentioning the minutes but it didn't work "is this specific to certain UNIX platforms?" I am using Solaris

thanks
 
Back to top
gries818
PostPosted: Thu Nov 22, 2007 12:36 am Reply with quote

PROfessional Member
 
 


Joined: 07 Jul 2004
Posts: 6572
Sorry man, my knowledge of the deep unix stuff is very limited.

Good luck though
 
Back to top
adnanmadi
Adnan Madi
PostPosted: Thu Nov 22, 2007 3:33 am Reply with quote

PRO Level 15
 
 


Joined: 14 Mar 2005
Posts: 1084
Location: Ramallah, Palestine
thanks for the try my friend, I don't have high expectations that other people can help because this forum is becoming inactive, I hope that me and you will make it a live forum wink
 
Back to top
Absolute-Zero
Dan Wright
PostPosted: Thu Nov 22, 2007 7:10 am Reply with quote

PROfessional Member
 
 


Joined: 26 Jun 2004
Posts: 7632
Location: E13 9AZ
Have you tried simplifying the cron syntax? You can specify five minute interval in (some version of)cron by using the following...

*/5 * * * *

...and you could also put the command you want to execute into a script then have cron run the following...

*/5 * * * * movefiles.sh

Just an idea.
 
Back to top
adnanmadi
Adnan Madi
PostPosted: Thu Nov 22, 2007 11:26 am Reply with quote

PRO Level 15
 
 


Joined: 14 Mar 2005
Posts: 1084
Location: Ramallah, Palestine
Happy Hammer wrote:
Have you tried simplifying the cron syntax? You can specify five minute interval in (some version of)cron by using the following...

*/5 * * * *

...and you could also put the command you want to execute into a script then have cron run the following...

*/5 * * * * movefiles.sh

Just an idea.

adnanmadi wrote:
something else, I tried to use */5 instead of mentioning the minutes but it didn't work "is this specific to certain UNIX platforms?" I am using Solaris


I will try the script thing, maybe a workaround will work
thanks Dan
 
Back to top
Absolute-Zero
Dan Wright
PostPosted: Thu Nov 22, 2007 11:35 am Reply with quote

PROfessional Member
 
 


Joined: 26 Jun 2004
Posts: 7632
Location: E13 9AZ
Sorry Adnan, missed the bit about */5 in your post. Yes, it appears some version of cron don't support that particular format.

Is it possible for you to upgrade the version of cron you are using?
 
Back to top
adnanmadi
Adnan Madi
PostPosted: Thu Nov 22, 2007 11:41 am Reply with quote

PRO Level 15
 
 


Joined: 14 Mar 2005
Posts: 1084
Location: Ramallah, Palestine
it is ok man,
I am not the owner of the server it is for a client and I have no control of it so I think I will live without simplicity for sometime wink

thanks anyway, will try tomorrow the script and I will update you
 
Back to top
Absolute-Zero
Dan Wright
PostPosted: Thu Nov 22, 2007 11:52 am Reply with quote

PROfessional Member
 
 


Joined: 26 Jun 2004
Posts: 7632
Location: E13 9AZ
There's no particular reason for upgrading cron except that a later Solaris version may support the */ interval syntax.

It is, indeed, rather odd that the output file is being created correctly but the files seem to be being moved at different times...
 
Back to top
adnanmadi
Adnan Madi
PostPosted: Mon Nov 26, 2007 12:48 am Reply with quote

PRO Level 15
 
 


Joined: 14 Mar 2005
Posts: 1084
Location: Ramallah, Palestine
well, suddenly my cron job is working properly smile I think someone was doing the same thing when I was testing my cronjob.

thanks a lot Dan.
 
Back to top
Back to top
Index >> Unix, Linux, & Macintosh >> Weird Cronjob

Page 1 of 1

 


Tired of the Ads? Registered users have 80% less adverts.