Arnav Gupta

profile
Code Structure: Session 03: crontab parser [TS]
profile
64 seats left
1 session

What will we build ?

Unix has a 'cron' utility that reads a 'crontab' file to run scripts periodically. It has 5 fields that define what time the command is to be executed.


Example crontab entries -

```
0 12 * * 1-5 /path/to/script.sh # Runs at 12:00 PM, Monday to Friday
*/10 9-17 * * * /path/to/task.sh # Runs every 10 minutes from 9 AM to 5 PM
0 0 1 1 * /backup.sh # Runs at midnight on January 1st
@daily /run/daily_job.sh # Runs once per day
```

We will build a reusable library that can parse crontab entries and figure out when it will next execute.


What all will be covered?

  1. Structuring and organising your code cleanly
  2. User appropriate design patterns (without over-engineering)
  3. Keeping a clean library interface that others can use
  4. Test-driven development


Who should attend ?

As an SDE1, you are expected to be able to solve a problem by writing code, and your code is heavily reviewed by seniors. As an SDE2 it is expected you not only solve problems with code, but you write elegant code that looks beautiful, works performantly, is extendible easily and is highly readable.

This is a great session if you are an SDE1 or early stage SDE2 looking to improve on the expectations from an SDE2.

That said, anyone and everyone is welcome to register if you feel this session adds value


Past Session Links

Code that was written during some of the past sessions are available here


  • https://github.com/championswimmer/low-level-design-problem
  • https://github.com/championswimmer/url-parser-workshop-typescript
199+