Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the CRON schedules and adding a bit of IT Assets content #62

Merged
merged 2 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ This policy applies to all employees, contractors, consultants, temporary and ot
- Sensitive data must be securely erased from IT assets before disposal to prevent unauthorized access.
- Records of asset disposal must be maintained, including details such as disposal date, method, and recipient.

### 3.5 Security
### 3.5 Asset Refresh

To ensure that all employees have access to up-to-date and efficient technology, the following device refresh policy is established:

- **Junior and Senior Roles**: Employees in junior and senior roles are eligible to refresh their devices every four years.
- **Principal and Partner Roles**: Employees in principal roles are eligible to refresh their devices every two years.

### 3.6 Security

- Security measures must be implemented to protect IT assets from unauthorized access, theft, and damage.
- Access controls must be established to restrict access to sensitive IT assets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,18 @@ export async function retractConnection(timer: Timer, context: InvocationContext
await deleteConnection(config);
}

const currentDate = new Date();
const cronExpression = `0 0 0 ${currentDate.getUTCMonth()} ${currentDate.getUTCDay()} *`;
app.timer('deployConnection', {
schedule: '0 0 0 30 2 *',
// Runs every year
schedule: cronExpression,
runOnStartup: process.env.AZURE_FUNCTIONS_ENVIRONMENT === 'Development',
handler: deployConnection
});

app.timer('retractConnection', {
schedule: '0 0 0 30 2 *',
// Runs every year
schedule: cronExpression,
runOnStartup: false,
handler: retractConnection
});
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@ This policy applies to all employees, contractors, consultants, temporary and ot
- Sensitive data must be securely erased from IT assets before disposal to prevent unauthorized access.
- Records of asset disposal must be maintained, including details such as disposal date, method, and recipient.

### 3.5 Security
### 3.5 Asset Refresh

To ensure that all employees have access to up-to-date and efficient technology, the following device refresh policy is established:

- **Junior and Senior Roles**: Employees in junior and senior roles are eligible to refresh their devices every four years.
- **Principal and Partner Roles**: Employees in principal roles are eligible to refresh their devices every two years.

### 3.6 Security

- Security measures must be implemented to protect IT assets from unauthorized access, theft, and damage.
- Access controls must be established to restrict access to sensitive IT assets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,18 @@ export async function retractConnection(timer: Timer, context: InvocationContext
await deleteConnection(config);
}

const currentDate = new Date();
const cronExpression = `0 0 0 ${currentDate.getUTCMonth()} ${currentDate.getUTCDay()} *`;
app.timer('deployConnection', {
schedule: '0 0 0 30 2 *',
// Runs every year
schedule: cronExpression,
runOnStartup: process.env.AZURE_FUNCTIONS_ENVIRONMENT === 'Development',
handler: deployConnection
});

app.timer('retractConnection', {
schedule: '0 0 0 30 2 *',
// Runs every year
schedule: cronExpression,
runOnStartup: false,
handler: retractConnection
});
Loading