Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CRON Question
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Miscellaneous
Thread ID:
01518445
Message ID:
01518453
Views:
68
>>>I need to implement a schedule-based process using a CRON. Anyone know of a function or any code where I can pass in a CRON and get back a bool if it's time to run?
>>
>>I thought CRON was a Unix daemon for task scheduling. What do you mean by 'pass in a CRON' ?
>
>It is a unix thing but for some reason we're using it here in our C# apps. So I have to use it.
>
>I want to pass in a CRON expression, ie "* * * * * " or something like it, and get back a bool if the expression evaluates to DateTime.Now or past DateTime.Now.

OK - that looks like a cron table entry. But how likely is it, given that you can translate a cron value to a datetime struct, that if will be exactly the same as DateTime.Now ? (It can always be considered as 'past' because cron table entries don't specify a year)

FWIW cron table entries are defined down to the minute level.

UPDATE: Also, an added wrinkle, a single cron table entry can effectively refer to multiple times....
Previous
Reply
Map
View

Click here to load this message in the networking platform