Atom Scheduled Tasks


#1

Hi,

Is there any way to do a scheduled task in the atom editor?

Like do ‘this’ ‘ever 30 mins’.

Thanks in advance.


#2

Let me return with a question - or two (for not knowing the answer)…
Could you develop a Javascript or Coffeescript code that would do that?
Could this code capture the real time clock?

The init script of Atom could run this code.

Are you perhaps thinking of auto saving?.. there should be packages available for that.


#3

Hi @danPadric

Thank you for your answer. – huh sorry, questions! :stuck_out_tongue:

I can give a try with Javascript or Coffee Script code.
I am not sure this will create any ‘Performance issue’. Like, keep the job running in the background.

I need to perform some custom actions other than auto-save.

I taught atom may have some pre-build way to achieve this.

Will give a try and thanks again. :slight_smile:


#4

Hey!

I do not really know anything super helpful to your question - just keeping the discussion alive for the experts to notice. I am sure the Atom universe has something helpful.

How about looking at:


Let me know (please) if you get something working.
Cheers + good luck.


#5

The packages are really helpful. I was searching the packages with search key ‘interval’. I found nothing useful.
But these two packages seems related to my question. Thanks, man :smile:


#6

Created a package for custom notifications at regular interval.
https://atom.io/packages/custom-notifications


#7

Nice!! I hope you had some fun in thee process too. :wink:

May I make a suggestion for a future expansion?
(I have no clue on how to do it)


How about making it possible for your package to make a “silent” notification. This notification type is for triggering other packages. In other words (your) package to (other) package notification.

For example: If I develop an auto-save package, I then link your package onto it to give my package a signal at regular intervals to do its task.


Thank you for giving your feedback and sharing your work.


#8

“Notification” suggests that the interval package is passing data to a secondary package that the secondary package interprets and uses. All that needs to happen is for the interval package to run a command every X seconds, and it can be instructed on what commands and how often through a CSON file.

If I develop an auto-save package, I then link your package onto it to give my package a signal at regular intervals to do its task.

It would be better for users for you to include interval tracking in your own package. It’s not a large amount of code and including it would save them from having to install a second package just to use yours.


#9

Take a look at setTimeout


#10

Yes it was fun… -always :wink:

“silent” notification: Sounds like a good idea for an enhancement. Will take a look. Thank for the feedback and idea for an enhancement. :slight_smile:


#11

Do the task for the fun / academia of it.
Please realise I know very little.
The real authorities on the matter have spoken their mind on this.