Inspiration

The idea for Quartz came about when helping a friend to deploy a script that needs to be executed at regular timings everyday; to achieve that, I had to go through the mundane hassle of duck-tapping the script to a server, setting up a cron job, and deploying it to the cloud so as to ensure that it runs 24/7. This reminded me of the many occasions where I faced such a situation, and I wondered if I could combine the simplicity of Functions as a Service (e.g. AWS lambda) with the ergonomics of developer tools like surge.sh for swift and fuss-free development and deployment of cron jobs on the cloud.

What it does

  1. Quartz is a command-line program that allows you to scaffold a cron function as a service project.
  2. You can then specify your timezone and cron expression within the config file.
  3. Afterwards, you may express your cron logic within an exported function that would be invoked whenever the cron job is scheduled to fire.
  4. Deploy the project to the cloud right from your terminal via quartz deploy.
  5. In 3 simple steps, you've deployed a cloud cron job (e.g. to auto-mark your temperature, fetch bitcoin updates and send it to a telegram bot etc) with minimal hassle!

How I built it

For this hackathon submission, the Quartz CLI program interacts with a Quartz server that deploys docker containers to fulfil their cron tasks. The development of a custom backend serves as a mean to simulate the cloud, and to gain more exposure to the docker engine and its APIs.

Challenges I ran into

  1. File upload issues from the CLI client to the server.
  2. Lack of familiarity with designing CLI programs and using Cobra (a popular CLI library for Go).
  3. Procrastination.

Accomplishments that I'm proud of

Finishing the submission, and possibly having built something useful.

What I learned

Avoid Postman for testing file uploads (especially .zip and .tar.gzip for some reason), something about them randomising the boundary parameter of a multipart/form-data request causes EOFs on the backend.

What's next for Quartz

The Quartz CLI could go through a thorough re-design and abstract over AWS/GCP/Azure's scheduling services and function as a service offerings. As such, users would still benefit from Quartz's ease of development and deployment for cron functions on the cloud (no manual configuration needed to tie these services together) while only needing to supply an API key in the config file to utilise their most trusted cloud provider.

Built With

Share this project:

Updates