Easy cheat: Use the "env" (or printenv) command to capture your "live" shell environment to a file.
Edit out chunks you don't think you need for a "batch" process. Sprinkle in appropriate exports. Insert this in the front of your cron job's script. Note: I have seen cases where cron jobs weren't (ahem) "punctual"; Writing for a cron, however, means a different mindset from writing a daemon process. -soup On Wed, Apr 18, 2018 at 12:16 PM, Paul Flint <[email protected]> wrote: > Dear David, > > If you are periodically waking to take data, then you really need to be > using "crontab" as it is essentially built for this type of behavior. > > The gotcha with crontab is that you need to establish environment > variables as part of your program's execution. If you would like I shall > endeavor to remember the angle on this. > > Once it is running you can say pretty much any interval you would like. > > Once you beat the environment variable issue, crontab can be very "nice" > (no pun intended :^) > > Regards, > > Flint > > On Wed, 18 Apr 2018, Dave Jones wrote: > > Date: Wed, 18 Apr 2018 06:36:36 -0700 >> From: Dave Jones <[email protected]> >> Reply-To: Linux on 390 Port <[email protected]> >> To: [email protected] >> Subject: Linux "sleep" command not waking up under high CPU utilization >> >> Hello, gang. >> >> I have a very simple bash script that runs a trivial data collection >> task, and then does a Linux "sleep im" to wait a minute before running >> the data collection task again. Under very high CPU loads (> 90%) I have >> noticed that the "sleep" command does not seem to wake up after one >> minute but instead wakes up 15 to 20 minutes later. This is on a Red Hat >> 6.9 guest running under z/VM 6.4 on a z12 box. >> >> I would like to buy a clue here if I could. >> >> Thanks. >> >> DJ >> >> -- >> >> DAVID JONES | MANAGING DIRECTOR FOR ZSYSTEMS SERVICES | z/VM, Linux, and >> Cloud >> 703.237.7370 (Office) | 281.578.7544 (CELL) >> >> INFORMATION TECHNOLOGY COMPANY [1] >> >> >> Links: >> ------ >> [1] http://www.itconline.com/ >> >> ---------------------------------------------------------------------- >> For LINUX-390 subscribe / signoff / archive access instructions, >> send email to [email protected] with the message: INFO LINUX-390 or >> visit >> http://www.marist.edu/htbin/wlvindex?LINUX-390 >> ---------------------------------------------------------------------- >> For more information on Linux on System z, visit >> http://wiki.linuxvm.org/ >> >> > Kindest Regards, > > > > ☮ Paul Flint > (802) 479-2360 Home > (802) 595-9365 Cell > > /************************************ > Based upon email reliability concerns, > please send an acknowledgement in response to > <https://maps.google.com/?q=d+an+acknowledgement+in+response+to&entry=gmail&source=g> > this note. > > Paul Flint > 17 Averill Street > Barre, VT > 05641 > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO LINUX-390 or > visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > ---------------------------------------------------------------------- > For more information on Linux on System z, visit > http://wiki.linuxvm.org/ > -- John R. Campbell Speaker to Machines souperb at gmail dot com MacOS X proved it was easier to make Unix user-friendly than to fix Windows "It doesn't matter how well-crafted a system is to eliminate errors; Regardless of any and all checks and balances in place, all systems will fail because, somewhere, there is meat in the loop." - me ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
