xshell 1.3.9 → 1.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/utils.d.ts CHANGED
@@ -11,7 +11,7 @@ export declare function typed_array_to_buffer(view: ArrayBufferView): Buffer<Arr
11
11
  /** 每天在固定时间执行操作
12
12
  - hour: 0 - 23 之间的整数,在这个点执行
13
13
  - action */
14
- export declare function schedule_everyday(hour: number, action: () => Promise<void>): Promise<void>;
14
+ export declare function schedule_everyday(hour: number, minute: number, action: () => Promise<void>): Promise<void>;
15
15
  export declare function log_line(): void;
16
16
  export declare function sha256(data: string | Uint8Array): string;
17
17
  export declare function sha1(data: string | Uint8Array): string;
package/utils.js CHANGED
@@ -30,10 +30,10 @@ export function typed_array_to_buffer(view) {
30
30
  /** 每天在固定时间执行操作
31
31
  - hour: 0 - 23 之间的整数,在这个点执行
32
32
  - action */
33
- export async function schedule_everyday(hour, action) {
33
+ export async function schedule_everyday(hour, minute, action) {
34
34
  const now = Date.now();
35
35
  let target = new Date();
36
- target.setHours(hour, 0, 0, 0);
36
+ target.setHours(hour, minute, 0, 0);
37
37
  // 如果目标时间已过,设定为明天的时间
38
38
  if (now > target.getTime())
39
39
  target.setDate(target.getDate() + 1);