Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 450802

Summary: Hwcert catalog's postdate cron job should run more than once a day to support setting "today" as the post date.
Product: [Retired] Red Hat Hardware Certification Program Reporter: XINSUN <xisun>
Component: Hardware CatalogAssignee: XINSUN <xisun>
Status: CLOSED CURRENTRELEASE QA Contact: Yu Shao <yshao>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: averma, bxu, efeng, rlandry, xiqin, ykun, yshao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://https://hardware.redhat.com/
Whiteboard:
Fixed In Version: 3.2rh-20080801.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-04 17:56:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch Fix:
none
Patch Improve: none

Description XINSUN 2008-06-11 03:08:29 UTC
Description of problem:
The reviewer set postdate:"2008/6/9" on June 9th 01:57 EST.(meaning set today as
the post date).
Then the post date cron job posts this cert at "2008/6/10 00:01 EST"
  
Actual results:
This cert was posted at "2008/6/10"

Expected results:
This cert will be posted at "2008/6/9"

Additional info:

Comment 1 XINSUN 2008-06-11 03:47:02 UTC
The reason caused this bug is:
    The postdate cron job runs at 00:01 EST (mid-night once everyday) to query
and process the certs which were closed and their postdate <= NOW(). 

    Once someone sets "today" (eg.6/9) as the postdate at 6/9 01:57 EST which is
after the 6/9's cron runs time ("00:01"). It will be missed and processed by the
next day (6/10 00:01 EST).
   
    My idea is that run the postdate cron job for "every 30 mins" or "twice in a
day("00:01","23:59")" to support setting today as post date. 

   "every 30 mins":
       */30 * * * * root cd /var/www/html/hwcert; ./postdate.pl 2> /dev/null
or 

   "twice in a day":
       1 0 * * * root cd /var/www/html/hwcert; ./postdate.pl 2> /dev/null
       59 23 * * * root cd /var/www/html/hwcert; ./postdate.pl 2> /dev/null


  
Pls give me some your suggestion. "every 30 mins" or "twice in a day" or other
thought, even maybe we may deny user to set postdate as today. :)



Best Regards!
Nicho




Comment 2 Rob Landry 2008-06-12 20:29:04 UTC
Sounds like the once a day would work if we were to go ahead and block "today"
as a choice from the dialog.  The interface should default to tomorrow and then
error if a date =< today is submitted.  It sounds like that would solve the
issue seen?

Comment 3 XINSUN 2008-07-08 09:19:55 UTC
Created attachment 311242 [details]
Patch Fix:

Deny user to set the today as posting date.

Comment 4 Rob Landry 2008-07-17 20:35:59 UTC
Suggested error message "The selected posting date is not in the future.  Press
back to select another date."

Comment 5 XINSUN 2008-07-18 17:43:48 UTC
Created attachment 312158 [details]
Patch Improve:

Follow Rob's suggestion and change the error message.

thanks a lot :)

Best Regards!
nicho

Comment 6 Rob Landry 2008-07-18 17:49:27 UTC
Looks good to me, if it's tested to work, I think it can be checked in.  Also
please don't forget to post to the mailing list the bug# and the patch (attach
id should be fine) so the people on the list know to review it.

Comment 7 eric_liu 2008-08-01 10:25:22 UTC
verified and run good