473,396 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Executing a cronjob at n minutes after the hour

I don't knwo if this is the correct forum, but ill assume so since it is running php scripts ; )


Anyways I need a script to run every 10 mins on the 5, so :05, :15, :25,:35,:45,:55

I know the syntax for running every 10 mins on the 10 is */10, but how do i make it do it on the 5? or 8 = )

maybe it isn't possible to do them all with one command I just don't want to clutter up my cronjobs with things that can be done with one line instead of 6
May 28 '07 #1
8 1729
pbmods
5,821 Expert 4TB
Changed thread title to better match contents (hm... shoulda proofed that before I moved it out of a forum where I have mod privileges :P).

I'm going to move this thread to the shell scripting forum where it will receive more relevant exposure.
May 28 '07 #2
sorry wasnt sure what forum = )

anyways anyone have a clue? = )
May 29 '07 #3
arne
315 Expert 100+
I don't knwo if this is the correct forum, but ill assume so since it is running php scripts ; )


Anyways I need a script to run every 10 mins on the 5, so :05, :15, :25,:35,:45,:55

I know the syntax for running every 10 mins on the 10 is */10, but how do i make it do it on the 5? or 8 = )

maybe it isn't possible to do them all with one command I just don't want to clutter up my cronjobs with things that can be done with one line instead of 6
You can of course always go for the simple solution: "8,18,28,38,48,58" (one line!), but you could also try with ranges (they can be combined with skipping), so something like "8-58/10". Don't know if that works, though ... try it and let us know :-)

arne
May 29 '07 #4
Hi,

Is it possible to insert a job using "./ksh" while all current jobs are using "./csh"


Thanks...

BR,
-coaxfiber
May 29 '07 #5
prn
254 Expert 100+
Hi,

Is it possible to insert a job using "./ksh" while all current jobs are using "./csh"


Thanks...

BR,
-coaxfiber
This question really is not related to the original, so it ought to be in a new thread of its own.

However, the answer to the question is yes. You do it the same way you specify the interpreter for any script -- in the first line:
Expand|Select|Wrap|Line Numbers
  1. #! /bin/ksh
Then when you run the script, or refer to it in your crontab, ksh will be used to run the remainder of the script.

HTH,
Paul
May 29 '07 #6
Thank You Very Much!!!

Best Regards,
-coaxfiber
May 30 '07 #7
8-58/10

that worked out it seems

thanks for the help!!! = )
Jun 3 '07 #8
arne
315 Expert 100+
8-58/10

that worked out it seems

thanks for the help!!! = )
Thanks for letting us know!

arne
Jun 4 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Dennis D. | last post by:
VB.net does not seem to have adequate structure for handling time within it's own code. Subtract 15 minutes from 00:00 AM, and an out of range condition results. Subtract 15 minutes from 12:00 PM,...
10
by: Heiko Pliefke | last post by:
Hi NG! I wrote a stored procedure which at first deletes 100.000 rows and then inserts 100.000 new rows. There is a huge difference between executing this SP in the query-analyzer (runtime...
2
by: James P. | last post by:
Hello, In my Access report, I have a minutes field in the detail line. How do I convert that minute to hour and minute. The problem for me now is if I take the minutes, say 75 divide by 60, it...
1
by: Al-Pacino | last post by:
Hello All, I am am having a strange problem. I am trying to execute a DTS package from VB .NET (.aspx) page. The DTS package takes 21 minutes to execute. When the aspx page sends a command to...
3
by: Mossum | last post by:
Hello, I have a PHP file that reads another PHP file and writes it as a static HTML page. I'd like to run the first PHP file as a cronjob (so that the static HTML page is updated once an hour)....
6
by: JamesG | last post by:
I'm trying to convert a unix timestamp to a readable time, such as 4 hours ago, or 25 minutes ago. My code is below: function ago($ts) { /* time difference */ $ts = (time() - $ts); if($ts <...
12
by: remya1000 | last post by:
how can i select time (hours,minutes,second) in updown arrow buttons in VB.NET. as we have current time displayed in date and time properties in our system. in date and time properties, while...
2
by: phanicrn | last post by:
Hi Everyone I Have column in sql server databas as "HHMMSS" and data as and i am doing a substring to get values for hours and minutes. since my calculations based on hour interval and 30...
0
by: ecmrd600 | last post by:
I have put my link into cronjob like Entry 1 Command to run: http://www.ecmrd.com/dbiplab/white_...cal_compile.php Minute(s):59 Hour(s): every 1 hr
3
by: shaif | last post by:
Hi all, I am working on a module of Php project with SQL server. I design a date filed in the table smalldatetime types. I want to get Hour and minutes. I write the code bellow: Its works for hour...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.